Skip to content

benchmark-dea

2 messages · farzana akbari, Jim Lemon

#
in the name of God


hi dear

I  use benchmark package to use of dea  and when I wanna save my result
as csv by this as below
 write.csv(farzana,'D:sajjaad.csv')

I can not and the error is as below


Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
stringsAsFactors) :
  cannot coerce class ""Farrell"" to a data.frame


what should I do ?


best regards
farzana
#
Hi farzana,
Probably the first thing is to ascertain what the class of "farzana" might be:

class(farzana)

Because "write.csv" expects "the object to be written, preferably a
matrix or data frame. If not, it is attempted to coerce x to a data
frame." to be the first argument. It seems that "farzana" is neither a
matrix nor a data frame and something for which there is no method to
convert it to one.

The second thing to do is to try to work out what is inside "farzana":

str(farzana)

This will produce a summary of what is in there. _Maybe_ with that
summary you can figure out how to convert it into a data frame. If
not, you can always save the object:

save(farzana,file="farzana.Rdata")

and reload it later.

Jiim


On Thu, Jun 16, 2016 at 5:47 AM, farzana akbari
<farzana.akbari2013 at gmail.com> wrote: