[R] How to extract information from .Rdata format
Ana Marija
@okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Sat Aug 1 04:53:47 CEST 2020
Hi Bert,
it gives me this:
> a=load("paired_example.Rdata")
> str(a)
chr [1:3] "rawdata" "treatment" "patient"
I don't know how to extract "treatment" for example in a data frame.
I tried this but of no help.
> b=a[[2]]
> b
[1] "treatment"
> str(treatment)
chr [1:10] "treat" "treat" "treat" "treat" "treat" "control" "control" ...
but this is not the format I need.
On Fri, Jul 31, 2020 at 9:18 PM Ana Marija <sokovic.anamarija using gmail.com> wrote:
>
> Hello,
>
> I have this file:
> > a=load("paired_example.Rdata")
> > a
> [1] "rawdata" "treatment" "patient"
>
> I can extract "rawdata" with:
> dat<-local(get(load("paired_example.Rdata")))
>
> Can you please advise how would I extract in data frame "treatment"
> and "patient"?
>
> Thanks
> Ana
More information about the R-help
mailing list