Install sqldf package as below : install.packages(“sqldf”) We load sqldf package as : library(sqldf) We are working on UCBAdmissions dataset. We load UCBAdmissions dataset . data(“UCBAdmissions”) The data contains students admission status as Admit , Gender , Dept as Department , Freq as ...
User defined functions in R User defined functions in R: We can create user defined function by using function() . We create a function object as: function_name<- function(argument) { #Function Body } The different parts ...
new blog Functions in R We are going to introduce some basic functions which can help us to work easily in day-to-day work. apply() The apply function can be used to apply function to margins ...
Regrex Regular Expression A regular expression is a special text string for describing a certain amount of text . This certain amount of text receives the formal name of pattern . It is a pattern ...
Time Time and Date variables There are a variety of different types specific to time data fields in R. Here we only look at two, the POSIXct and POSIXlt data types: POSIXct The POSIXct data ...
Control structures in R These allow you to control the flow of execution of a script . It includes : if , else for while repeat break next return If The if statement allows you to control ...
plot We are using diamonds dataset to explore qplot() . Load ggplot2 package library(ggplot2) View diamonds dataset View(diamonds) We see the structure of diamonds dataset. str(diamonds) Output: We check top 6 observations of diamonds dataset. ...
scatterplot Scatterplot A scatter plot is a useful way to visualize two quantitative variables in a dataset. We are exploring mtcars dataset for some amazing data visualization. We check mtcars dataset description by using following code: ?mtcars It will ...
There are many types of objects / Data Structures to store R-object . The frequently used objects are – Vectors Matrices Arrays Factors Data Frames Lists Table Vectors A vector is most basic data ...
Coercion : Coercion includes type conversion . Type conversion means change of one type of data into another type of data. We have to type of coercion occurs : 1. Implicit Coercion 2. Explicit Coercion ...
Social Follow