I have a dataFrame:
V1,V2,V3,V4,V5
1.12331,4.331123,4.12335435,1,"asd"
1.123453345,5.654456,4.889999,1.45456,"qwe"
2.00098,5.5445,4.768799,1.999999,"ttre"
And I want to extract the first column, or all of columns if it's possible, to a string variable.
I'm trying the code below:
library(tidyverse)
td <- read_csv("test.csv")
Convert all the DataFrame to a String
var_text <- toString(td)
But the result is still not what I expect.
[1] "c(1.12331, 1.123453345, 2.00098), c(4.331123, 5.654456, 5.5445), c(4.12335435, 4.889999, 4.768799), c(1, 1.45456, 1.999999)"
I need something like:
strResult = "1.12331, 1.123453345, 2.00098, 4.331123, 5.654456, 5.5445, 4.12335435, 4.889999, 4.768799, 1, 1.45456, 1.999999"