문제

I'm trying to read in a (tab separted) csv file in R. When I want to read the column including a /, I get an error.

doSomething <- function(dataset) {
     a <- dataset$data_transfer.Jingle/TCP.total_size_kb
     ...
     }

The error says, that this object cannot be found. I've tried escaping with backslash but it did not work.

If anybody has got some idea, I'd really appreciate it!

도움이 되었습니까?

해결책

Give

head(dataset)

and watch the name it has been given. Perhaps it would be something like:

dataset$data_transfer.Jingle.TCP.total_size_kb

다른 팁

Two ways:

dataset[["data_transfer.Jingle/TCP.total_size_kb"]]

or

dataset$`data_transfer.Jingle/TCP.total_size_kb`
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top