Last data update: 2014.03.03

R: Convert Phenotypes object to a data.frame
as.data.frame,Phenotypes-methodR Documentation

Convert Phenotypes object to a data.frame

Description

Convert Phenotypes object to a data.frame

Usage

## S4 method for signature 'Phenotypes'
as.data.frame(x)

Arguments

x

A Phenotypes object

Value

A data.frame

Author(s)

Fabian Schmich

Examples

phenos <- Phenotypes(system.file("extdata", "Phenotypes_screen_A.txt", package = "gespeR"),
type = "SSP",
col.id = 1,
col.score = 2)
as.data.frame(phenos)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(gespeR)
Loading required package: ggplot2
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/gespeR/as.data.frame-Phenotypes-method.Rd_%03d_medium.png", width=480, height=480)
> ### Name: as.data.frame,Phenotypes-method
> ### Title: Convert Phenotypes object to a data.frame
> ### Aliases: as.data.frame,Phenotypes-method
> 
> ### ** Examples
> 
> phenos <- Phenotypes(system.file("extdata", "Phenotypes_screen_A.txt", package = "gespeR"),
+ type = "SSP",
+ col.id = 1,
+ col.score = 2)
> as.data.frame(phenos)
Source: local data frame [1,000 x 2]

             ID      Scores
         <fctr>       <dbl>
1  siRNAID_0001 -0.93028719
2  siRNAID_0002 -1.12820384
3  siRNAID_0003 -1.05265043
4  siRNAID_0004  0.80792721
5  siRNAID_0005 -1.41533349
6  siRNAID_0006  1.64265769
7  siRNAID_0007 -0.15733945
8  siRNAID_0008  0.74758974
9  siRNAID_0009 -0.95904664
10 siRNAID_0010 -0.04401824
..          ...         ...
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>