Column entry by value

I would like to select the column values in my dataset and assign them to a variable which I can then display in the console. Specifically I wish to have all the same column entries extracted, each into a dedicated variable. For this reason I have tried the following commands:

placebo <- recup[,c("Type")]
print(placebo)

The errors I receive resemble the following:

Error in c["Type"] : object of type 'builtin/closure' is not subsettable

I am unsure wether I should be using the select() function, or if I should be successful by list using positions or by ranges. First, why am not able to see any data being printed with my present commands? Also the 'c' does not appear to be necessary.

I think you wrote c["Type"] by mistake. I get the same error

c["Type"]
Error in c["Type"] : object of type 'builtin' is not subsettable

Be sure to use ( instead of [.

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.