1

I am trying to subset a column in R from an xlsx file. That particular column in excel is being used to plot a graph. Because of which when I try to subset that column it gives an error.

Error in subset.default(ds[, 2]) : argument "subset" is missing, with no default

This can be done by converting xlsx to csv or removing the graph but I want to solve this problem in R.

require(xlsx)
ds<-read.xlsx("Attachment-.xlsx", sheetName= "exchangeGBP", keepFormulas = FALSE)
ds<-subset(ds[,-1])
apply(ds,2,function)

The data looks like this:

enter image description here

Taher A. Ghaleb
  • 5,120
  • 5
  • 31
  • 44

1 Answers1

0

Just did it using ds <- ds$GBP.EUR Although still not sure why subset is giving error. Thanks anyway guys