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

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Sat Jul 20 10:17:01 CEST 2019


Hi Spencer,
While Sarah has already given you very good advice, there is a rough
method of checking whether one data set can be substituted for
another:

str(anno)
str(Dilution)

If you're lucky and the objects are not too complicated, this will
give you a start on whether one can be substituted for the other. For
example, if one is a vector and the other is a complicated list of
lists, forget it. If the two STRuctures look pretty much the same,
you've got a chance.

Jim

On Sat, Jul 20, 2019 at 12: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.



More information about the R-help mailing list