R append to list: How to Append Element in R List

R append to list - How to Append Element in R List

R list is a data structure having elements of different data types. To create a list in R, use the list() function. To access the list, use indexing. You can use integer, logical, or character vectors for indexing.  List in R can be modified that means you can add, update, or delete the list components. … Read more

OR in R: How to Use OR Operator in R

R OR Operator Tutorial with Example

Logical operators are used to carry out Boolean operations like AND, OR, and NOT, etc. The logical operators can operate on raw, logical, and number-like vectors. Moreover, logical operators allow us to change or compare the results. There are various types of operators available in R, and logical is one of them, and in that, … Read more

What is pnorm() Function in R

pnorm() Function in R with Example

The pnorm() function calculates the c. d. f. where X is normal. Optional arguments described on the online documentation specify the parameters of the particular normal distribution. pnorm in R The pnorm in R is a built-in function that returns the value of the cumulative density function (cdf) of the normal distribution given a certain random … Read more

pch in R: How to Use Plot Character in R

What is pch in R | Plot Character in R with Example

While creating a plot in R, you can add explanatory text like axis labels, titles, legends, or text. In addition, there are many plotting symbols available in R that can be used in plots. For example, the graphical argument used to specify point shapes is pch, and we will discuss the same in this article. … Read more

plot function in R: How to Plot Graph in R

plot() Function in R with Example

R language comes with a graphics package with a generic function called plot(), which is versatile and can be used to create different types of (X, Y) plots with points and lines. plot function in R The plot in R is a built-in generic method for plotting objects. The plot() isn’t a single defined function … Read more

How to Use setwd() Function in R

setwd() function in R with Example

The working directory can be your best friend or ruthless adversary. Confusion about the working directory is a great time waster. Whenever you want to perform some advanced action, you need to ensure that you are in the correct directory. Otherwise, it can create an issue for you. getwd in R The getwd in r … Read more

What is sapply() Function in R

R sapply - How to Use sapply() Function in R

The sapply() function works like lapply(), but it tries to interpret the output to the most fundamental data structure possible, either Vector or Matrix. The sapply() is a “wrapper” function for lapply(). The apply() function is bundled with R essential package if installed an R with Anaconda. The apply() function returns the vector or array by … Read more

as.Date in R: How to Use as.Date() Function in R

as.Date() Function in R with Example

To get today’s date in R, use the Sys.Date() function. Sys.Date() Output [1] “2021-03-11” To get the current date and time in R, use the date() function. date() Output [1] “Thu Mar 11 16:59:16 2021” Dates can be imported from character, numeric, POSIXlt, and POSIXct formats in R using the as.Date() method. as.Date in R … Read more

rnorm: What is rnorm() Function in R

rnorm() Function in R - Generate Random Numbers in R

The rnorm() function in R generates a random number using a normal(bell curve) distribution. Thus, the rnorm() function simulates random variates having a specified normal distribution. What is Normal Distribution in R The normal distribution is the collection of random data from independent sources. We get the bell shape curve by plotting a graph with … Read more

is.na in r: How to Use is.na() function in R

is.na in r - How to Use is.na() function in R

When working in a real-time dataset, you won’t get clean data. Real-world data is always filled with missing values. So if you are developing an algorithm that can predict the future values, you first need to clean the existing data, and based on that, you can create a model and feed the data. What is … Read more