Grokbase Groups R r-help June 2016
FAQ
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


  [[alternative HTML version deleted]]

Search Discussions

  • Jim Lemon at Jun 15, 2016 at 10:50 pm
    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
    wrote:
    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

    [[alternative HTML version deleted]]

    ______________________________________________
    R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedJun 15, '16 at 7:47p
activeJun 15, '16 at 10:50p
posts2
users2
websiter-project.org
irc#r

2 users in discussion

Jim Lemon: 1 post Farzana akbari: 1 post

People

Translate

site design / logo © 2017 Grokbase