[BioC] How to import the original data into knncat?

Sean Davis sdavis2 at mail.nih.gov
Tue Jun 15 17:19:57 CEST 2004


This is a useful read:

cran.r-project.org/doc/manuals/R-data.pdf


Sean

On 6/15/04 10:53 AM, "Liu, Xin" <Xin.Liu at arragen.com> wrote:

> Dear all,
> 
> The following example in the package of knncat run well in R, so we hope to
> cluster our data just following this. The problem is how to import the data,
> how to build the vector and matrix? The first collumn should be the
> indentifier? the second collumn should be the expression average? and the
> third collumn should be the classifier? The data should be imported as a text
> file, Excel file or other type of file? Any clue? Thanks a lot!
> 
> library(MASS) # Load data set
> syncat <- knncat (synth.tr, classcol=3)
> ## Not run: 
> syncat
> Train set misclass rate: 16.8
> synpred <- predict (syncat, synth.tr, synth.te, train.classcol=3,
>                   newdata.classcol=3)
> table (synpred, synth.te$yc)
>      
> synpred 0   1  
>     0 466  61
>     1  34 439
> #
> # Or do the whole thing in one pass:
> #
> ## End(Not run)
> knncat (synth.tr, synth.te, classcol=3)
> ## Not run: 
> Test set misclass rate: 9.5
> ## End(Not run)
> 
> Xin LIU
> 
> 
> 
> This e-mail is from ArraGen Ltd
> 
> The e-mail and any files transmitted with it are confidential and privileged
> and intended solely for the use of the individual or entity to whom they are
> addressed. 
> 
> Any unauthorised direct or indirect dissemination, distribution or copying of
> this message and any attachments is strictly prohibited.
> 
> If you have received the e-mail in error please notify helpdesk at arragen.com or
> telephone +44 28 38 363841 and delete the e-mail from your system.
> 
> E-mail and other communications sent to this company may be reviewed or read
> by persons other than the intended recipient.
> 
> Viruses : although we have taken steps to ensure that this e-mail and any
> attachments are free from any virus, you should, in keeping with good
> practice, ensure that they are actually virus free.
> 
> ArraGen Ltd. Registration Number NI 43067
> Registered Address :  Almac House, 20 Seagoe Industrial Estate, Craigavon,
> BT63 5QD
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list