How to combine 2 fields in a dataframe to create a new field?

0 votes
How to combine 2 fields in a data frame to create a new field?
Oct 16 in Data Analytics by ch
• 3,290 points
15 views

1 answer to this question.

0 votes

Use paste command or append function to join 2 fields in a data frame.

I used simple r variables, the method will remain the same for fields as well.

> a=3
> b=5
> paste(a,b)
[1] "3 5"
> append(a,b)
[1] 3 5
answered Oct 31 by Cherukuri
• 31,840 points

Related Questions In Data Analytics

0 votes
1 answer

How to create a new R6 Class in R?

You have to first create an object ...READ MORE

answered Jul 5, 2018 in Data Analytics by DataKing99
• 8,130 points
150 views
0 votes
1 answer
0 votes
1 answer

How to replace NA values in a dataframe with Zero's ?

It is simple and easy: df1<-as.data.frame(matrix(sample(c(NA, 1:10), 100, ...READ MORE

answered Apr 10, 2018 in Data Analytics by CodingByHeart77
• 3,690 points
143 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,690 points
576 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
58 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
77 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
187 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
121 views
0 votes
1 answer

How to create a new table in database from R?

Use dbGetQuery to create a table by ...READ MORE

answered Oct 14 in Data Analytics by Cherukuri
• 31,840 points
23 views
0 votes
2 answers

How to create a table in R without external file?

Tibble also creates a table-like structure. Use below ...READ MORE

answered Sep 3 in Data Analytics by anonymous
• 31,840 points
72 views