[R] How to create a data set from object/data frame?

Sarah Goslee @@r@h@go@|ee @end|ng |rom gm@||@com
Fri Jul 19 16:22:54 CEST 2019


Hi Spencer,

Your description doesn't make any sense to me. If anno is already an R
object, what are you trying to do with it?

data() is for loading datasets that come with packages; if your object
is already an R object in your environment, then there's no need for
it.

It sounds like you are possibly working through an example provided
elsewhere, that has sample data loaded with data(). If so, then you do
not need that step for your own data. You just need to import it into
R in the correct format.

If that doesn't help, then I think we need more information on what
you're trying to do.

Sarah

On Fri, Jul 19, 2019 at 10:18 AM Spencer Brackett
<spbrackett20 using saintjosephhs.com> wrote:
>
> Hello,
>
>   I am trying to create a data set from an object called ‘anno’ in my
> environment. I’ve tried arguments like saveRDS(anno, file = “”) and
> save(anno, file “.RData”) to save the object as a file to see if that will
> work, but it seems for the particular procedure I am trying to carry out, I
> need to transpose the object to a data set. Any ideas as to how I might do
> this? For reference, my next step in manipulating the data contained in the
> object is data(), which evidently does not work for reading in data frame
> objects as data(“file/object name).
>
> Best,
>
> Spencer
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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.



-- 
Sarah Goslee (she/her)
http://www.numberwright.com



More information about the R-help mailing list