Table: Table

Description Usage Arguments Value Examples

Description

Combine a table schema and a set of values into some type of Table object depending on what type of values are given.

Usage

1
Table(schema, values)

Arguments

schema

a table Schema object

values

an object that holds the content of the tables:
- a data frame
- a RowSet
- a string holding the path to a CSV file

Value

a Table object suitable for storing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
## Not run: 
# Define the table's column schema
cols <- list(
    Column(name='Name', columnType='STRING', maximumSize=20),
    Column(name='Chromosome', columnType='STRING', maximumSize=20),
    Column(name='Start', columnType='INTEGER'),
    Column(name='End', columnType='INTEGER'),
    Column(name='Strand', columnType='STRING', enumValues=list('+', '-'), maximumSize=1),
    Column(name='TranscriptionFactor', columnType='BOOLEAN'))
# create the schema
schema <- Schema(name='My Favorite Genes', columns=cols, parent=project)
# define the data to be added to the table
genes<-data.frame(
	Name=c("foo", "arg", "zap", "bah", "bnk", "xyz"), 
	Chromosome=c(1,2,2,1,1,1), 
	Start=c(12345,20001,30033,40444,51234,61234),
	End=c(126000,20200,30999,41444,54567,68686),
	Strand=c('+', '+', '-', '-', '+', '+'),
	TranscriptionFactor=c(F,F,F,F,T,F))
# now add the data to the table and save
table<-Table(schema, genes)
table<-synStore(table)

## End(Not run)

Sage-Bionetworks/synapser documentation built on Oct. 4, 2018, 10:18 p.m.