paste within another function

0 votes
I'm not clear why the first function operates and the second does not. Since everything other code in this example functions perfectly, my attention is limited to what is occurring with the paste() function. I tried the second function with a comma separator between each value in addition to what is displayed below.

In my function, the list should ideally be like follows, however instead of me listing these values, the paste() method should be used.

i.X41262.0.0, i.X41262.0.1, etc. are all equivalent to X41262.0.0.

c("eid", "X2784.0.0", "X2794.0.0", "fread("ukb33822.csv", select=

"X2804.0.0", "X2814.0.0", "X2834.0.0",

paste("X41262.0.," 0:65, sep = ""), "X3536.0.0", "X3546.0.0",

"X3581.0.0"))

biobank[biobank2, on = .(eid), `:=` (X2784.0.0 = i.X2784.0.0, X2794.0.0 = i.X2794.0.0,

X2804.0.0 = i.X2804.0.0, X2814.0.0 = i.X2814.0.0,

X2834.0.0 = i.X2834.0.0, X3536.0.0 = i.X3536.0.0,

X3546.0.0 = i.X3546.0.0, paste("X41262.0.", 0:65, " = ", "i.X41262.0.", 0:65, sep = ""),
Jun 24, 2022 in Data Analytics by Avinash
• 1,260 points
338 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
0 answers

Use of ggplot() within another function in R

Using the ggplot2 package, I'm attempting to ...READ MORE

Jun 22, 2022 in Data Analytics by avinash
• 1,840 points

closed Jun 22, 2022 by avinash 549 views
0 votes
1 answer

How to set choices of inputs within server function in shiny app?

@Kajal, Use renderUI function to add input elements ...READ MORE

answered Oct 28, 2019 in Data Analytics by anonymous
• 33,030 points
656 views
0 votes
1 answer

How does paste function work in R?

Paste function concatenates vectors together. Syntax: paste(v1,v2,sep = ...READ MORE

answered Oct 29, 2019 in Data Analytics by Cherukuri
• 33,030 points
914 views
0 votes
0 answers

pass character strings to ggplot2 within a function

In order to streamline my work process, ...READ MORE

Jun 24, 2022 in Data Analytics by Avinash
• 1,260 points
533 views
0 votes
0 answers

Why 'nrow()' function doesn't seem to work within 'summarise()' function?

See the code below: library(dslabs) \sdata(gapminder) gapminder percent > ...READ MORE

Jun 27, 2022 in Data Analytics by avinash
• 1,840 points
348 views
+1 vote
2 answers

Custom Function to replace missing values in a vector with the mean of values

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE ...READ MORE

answered Aug 14, 2019 in Data Analytics by anonymous
1,936 views
0 votes
1 answer

Big Data transformations with R

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

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,570 points
1,030 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,660 points
1,178 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,660 points
5,890 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

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

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
1,112 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP