## read a SDM file
sampdat <- SDMFrame(system.file("extdata", "Experiment1.txt",
package="ddCt"))
## you can also write
## sampdat <- new("SDMFrame",system.file("extdata", "Experiment1.txt",
## package="ddCt"))
## use the getter methods
sampleNames(sampdat)
## or the overloaded primitive accessors
sampdat[1:3,"Sample"]
## see all unique samples
uniqueSampleNames(sampdat)
## replace all sample names 'Sample1' and 'Sample2' in sampdat
## with 'NewSample1' and 'NewSample2'
uniqueSampleNames(sampdat,c("Sample1","Sample2")) <- c("NewSample1","NewSample2")
uniqueSampleNames(sampdat)
## or use this syntax to replace the gene names
uniqueDetectorNames(sampdat) <- c(Gene1="NewGene1", Gene2="NewGene2")
uniqueDetectorNames(sampdat)
## remove sample or detector
removeSample(sampdat, "Sample1")
removeDetector(sampdat, "Gene1")
## replace sample or detector
replaceSample(sampdat, "Sample1", "Sample0")
replaceDetector(sampdat, "Gene1", "PLCG1")
## right censoring the data
rightCensoring(sampdat, 35)
rightCensoring(sampdat, 35, 35)
Run the code above in your browser using DataLab