[R] clustering on Trinary data

2007-08-06 Thread Alex Tsoi
Dear all,

I have a data matrix with 7 independent variables, and each of them is a
trinary variable ( - 1, 0 , 1), and I would like to know what kinds of R
package or method I should use to perform the clustering.

Thanks for any comment or suggestion.


-- 
Lam C. Tsoi (Alex)
Medical University of South Carolina

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Using the object of character data type as the name of the slot

2007-06-21 Thread Alex Tsoi
Dear all,

I have a character string object:

 chara
[1]  The name of first slot

and a list object:

 class( try1)
[1] list


what I want to do is to use the chara as a slot's name of try1.

Of  course I could do it like:

 try1$The name of first slot  - matrix(, 3, 4)

to create a slot of 3x4 matrix with the name The name of first slot

However, I would like to know how could I utilize the object chara , and to
use the characters it contains as the name of the slot of try1.


I appreciate for any suggesion. Thanks.



-- 
Lam C. Tsoi (Alex)
Medical University of South Carolina

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to plot two graphics in one window

2007-06-15 Thread Alex Tsoi
I hope this could help:

http://tolstoy.newcastle.edu.au/R/e2/help/07/02/11127.html

Alex-


On 6/15/07, Miguel Caro [EMAIL PROTECTED] wrote:


 Hello ,
 Maybe this question you answered before, but i couldnt find something
 indicated in the mailing list.

 I wish to plot two graphics  in one window, for example y=sinx and
 y=exp(x)
 in the same windows, (the same interval for x).

 Thanks .

 Miguel.
 --
 View this message in context:
 http://www.nabble.com/how-to-plot-two-graphics-in-one-window-tf3929594.html#a11145186
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
Medical University of South Carolina

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] problem with read.table

2007-05-22 Thread Alex Tsoi
Dear all,

I  try to use read.table to get the data from a tab delimited file, and some
of the data is shown below:

3185heterogeneous nuclear ribonucleoprotein F
3187heterogeneous nuclear ribonucleoprotein H1 (H)
3188heterogeneous nuclear ribonucleoprotein H2 (H')
3189heterogeneous nuclear ribonucleoprotein H3 (2H9)
3190heterogeneous nuclear ribonucleoprotein K /// heterogeneous nuclear
ribonucleoprotein K
3190heterogeneous nuclear ribonucleoprotein K
3309heat shock 70kDa protein 5 (glucose-regulated protein, 78kDa)
3310heat shock 70kDa protein 6 (HSP70B')
3312heat shock 70kDa protein 8
3313heat shock 70kDa protein 9B (mortalin-2)
6302sarcoma amplified sequence
6303spermidine/spermine N1-acetyltransferase
6304special AT-rich sequence binding protein 1 (binds to nuclear
matrix/scaffold-associating DNA's)
6305SET binding factor 1
6307sterol-C4-methyl oxidase-like
6625Small nuclear ribonucleoprotein 70kDa polypeptide (RNP antigen)
6626small nuclear ribonucleoprotein polypeptide A
6627small nuclear ribonucleoprotein polypeptide A'
6628small nuclear ribonucleoprotein polypeptides B and B1
6629Small nuclear ribonucleoprotein polypeptide B''

when I use
 test - read.table(data.txt, colClasses = character, sep=\t)

I found out that test only has certain records:

3185heterogeneous nuclear ribonucleoprotein F
3187heterogeneous nuclear ribonucleoprotein H1 (H)
3188heterogeneous nuclear ribonucleoprotein H2 (H')
3312heat shock 70kDa protein 8
3313heat shock 70kDa protein 9B (mortalin-2)
6302sarcoma amplified sequence
6303spermidine/spermine N1-acetyltransferase
6304special AT-rich sequence binding protein 1 (binds to nuclear
matrix/scaffold-associating DNA's)
6628small nuclear ribonucleoprotein polypeptides B and B1
6629Small nuclear ribonucleoprotein polypeptide B''

and it means that whenever read.table reads  '  , it skips the next line,
until it reads  '   again

Could anyone  show me how to solve this kind of problem ?

I greatly appreciate for any suggestion.  Thanks.

Alex Tsoi-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] problem with read.table( )

2007-05-10 Thread Alex Tsoi
Hi All,

I would like to input a .txt file by using read.table()

the file data.txt:

NameID
IMAGE:131suid=115221
IMAGE:100020851265
IMAGE:100033464770
IMAGE:1000365suid=99969
IMAGE:100050055421
IMAGE:100087564770
IMAGE:1000892399655
IMAGE:1000942suid=112379
IMAGE:10071415001
IMAGE:100715055
IMAGE:1007164suid=117508
IMAGE:1007167suid=102504

when I use
 data - read.table(data.txt, sep=\t, header = TRUE)
 data
Name  ID
1  IMAGE:131 suid=115221
2  IMAGE:1000208   51265
3  IMAGE:1000334   64770
4  IMAGE:1000365  suid=99969
5  IMAGE:1000500   55421
6  IMAGE:1000875   64770
7  IMAGE:1000892  399655
8  IMAGE:1000942 suid=112379
9  IMAGE:10071415001
10 IMAGE:1007150  55
11 IMAGE:1007164 suid=117508
12 IMAGE:1007167 suid=102504


it seems perfectly fine, however, when I get access to data[1,1] ...

 data[1,1]
[1] IMAGE:131
12 Levels: IMAGE:131 IMAGE:1000208 IMAGE:1000334 ... IMAGE:1007167

How could I get rid of all the Levels in ALL of the entries.

It bothers me since when I have to assign certain values from data to a new
matrix b by:
 b - matrix(0,1,2)
 b[1,1] - data[1,1]
 b[1,1]
1

b[1,1] is 1 instead of the value IMAGE:131 I want


Greatly Appreciate for any help
Thanks,
Alex-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.