How to create our own dataframe in R?

0 votes

Hi Guys,

I am new in R. Can anyone help me, how can I create my own dataframe in R?

Apr 29 in Data Analytics by akhtar
• 11,270 points
139 views

1 answer to this question.

0 votes

Hi@akhtar,

Let's say you want to create one data frame related to student details. It contains three vectors as follows.

Name<- c("nadim","akhtar","lina","Mona")
Age<-c("20","21","22","20")
Gender<-c("M","M","F","F")
df<-data.frame(Name,Age,Gender)

Now you can see your data frame using View function.

answered Apr 29 by MD
• 24,500 points

Related Questions In Data Analytics

0 votes
1 answer

How to create excellent examples in R?

An excellent example must consist of the ...READ MORE

answered Apr 10, 2018 in Data Analytics by kappa3010
• 2,080 points

edited Apr 12, 2018 by kappa3010 77 views
0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,710 points
864 views
+1 vote
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

answered Apr 13, 2018 in Data Analytics by Sahiti
• 6,290 points
527 views
0 votes
1 answer

How to limit output of a dataframe in R?

For randomly sampling a row/cell where a ...READ MORE

answered Apr 18, 2018 in Data Analytics by kappa3010
• 2,080 points
107 views
+9 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 8, 2018 in Data Analytics by Abhi
• 3,680 points
149 views
0 votes
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,820 points
1,104 views
+1 vote
2 answers
0 votes
1 answer

Trying to find frequent itemsets of a data set using arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", "milk", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,820 points
76 views
0 votes
1 answer

How to install R Studio in Windows?

Hi@akhtar, To install R Studio in your system, ...READ MORE

answered Apr 29 in Data Analytics by MD
• 24,500 points
114 views
0 votes
1 answer

How to create Heatmap for visualizing my dataset?

Hi@akhtar, You have to import seaborn module to ...READ MORE

answered May 4 in Data Analytics by MD
• 24,500 points
132 views