Hi! I'm very new to RStudio so i'm sorry if i'm going to ask a very silly question. I have 9 data frame that looks like the one i've posted. They all have the same number of raws and columns and the raws' name are the same. The difference between every file is just the numbers in it. I'm finding difficulties merging them together in just one file, can someone help me?
Can you please share a small part of the data sets in a copy-paste friendly format?
In case you don't know how to do it, there are many options, which include:
i used the dput function (i don't know if used it properly). They're like 50.000 rows so i used the head function first to just show you the first six.
structure(list(V2 = c("Veh_1", "20", "398", "1", "15", "10")), row.names = c("Gene",
"A1BG", "A1BG-AS1", "A1CF", "A2M", "A2M-AS1"), class = "data.frame")
You are not being very specific about your problem, so this is what I can come up with using the information you are providing so far
library(tidyverse)
df1 <- structure(list(V2 = c("Veh_1", "20", "398", "1", "15", "10")), row.names = c("Gene",
"A1BG", "A1BG-AS1", "A1CF", "A2M", "A2M-AS1"), class = "data.frame")
df2 <- df1
ls(pattern = "^df") %>%
map_dfc(~ eval(as.name(.x)))
#> New names:
#> * V2 -> V2...1
#> * V2 -> V2...2
#> V2...1 V2...2
#> Gene Veh_1 Veh_1
#> A1BG 20 20
#> A1BG-AS1 398 398
#> A1CF 1 1
#> A2M 15 15
#> A2M-AS1 10 10
Created on 2021-05-14 by the reprex package (v2.0.0)
I managed to do it. Thank you so much, i solved the problem.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.