Remove quotes from a character vector in R

前端 未结 10 2279
盖世英雄少女心
盖世英雄少女心 2020-11-29 01:06

Suppose you have a character vector:

char <- c(\"one\", \"two\", \"three\")

When you make reference to an index value, you get the follo

10条回答
  •  情话喂你
    2020-11-29 01:50

    I'm just guessing, is this in the ball park of what you're trying to achieve?

    > a <- "a"
    > a
    [1] "a" # quote yes
    > as.factor(a)
    [1] a #quote no
    

提交回复
热议问题