0

I have a tbl_df format dataset below:

dput(sample_beast)

structure(list(user_id = c("1065083171501428736", "1084652637608267778", 
"1498500199", "1092488473804558336", "1087762163194724353", "1089218786966884352"
)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame"
))

I attempt to turn it into a vector but I get strange slashes and a truncated message at the end:

sample_beast<-as.data.frame(sample_beast)
sample_beast<-as.character(sample_beast)

sample_beast

[1] "c(\"1065083171501428736\", \"1084652637608267778\", \"1498500199\", 
\"1092488473804558336\", \"1087762163194724353\", \"1089218786966884352\")"

How do fix this so that it is a normal vector without the slashes?

Expected output:

str(sample_beast)

chr [1:6] "1065083171501428736" "1084652637608267778" "1498500199" 
"1092488473804558336" ...
nak5120
  • 4,089
  • 4
  • 35
  • 94

0 Answers0