[R] Can you subset with the context of RExcel

Matthew W Nash spjgmwn at iop.kcl.ac.uk
Tue Apr 12 12:06:12 CEST 2005


Hi all,

	I am trying to use RExcel at the moment. I am able to get it to work for
simple commands, but I can't seem to get it to work when I subset the data.
So for example, if I start RExcel, and then 'Put R var' with the following:

1	1	2
2	1	2
3	1	2
4	1	2
5	1	2
6	1	2
7	1	2
8	1	2
9	1	2
10	1	2

and set it to variable x, then I 'run R' on the code 'z <- t(x)' and use
'Get R value' for z, I get what I expect - a transposed version of x.

But if I do the following 'z <- x[,2]' and get the value z, all I get is a
'Subscript out of range' error warning. This happens when I do the same
thing using the Macro functions. Hence my question is, is it possible to do
subscripting within the context of RExcel?

I would gratefully appreciate any help on this problem.

Matthew Nash,

Post-Doctoral Research Worker,
GENDEP study,
SGDP, Institute of Psychiatry,
PO82, Room CB.15,
16 De Crespigny Park,
London, SE5 8AF,
United Kingdom

Phone: (+44) 207 848 0805

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
Announcing the 6th MRC SGDP SUMMER SCHOOL 25 -­ 29 July 2005 with courses in
a) Twin model fitting, Mx
b) Microarrays (Affymetrix), gene expression, SNPs
c) Linkage, association and allied methods
http://sgdp.iop.kcl.ac.uk/summerschool/




More information about the R-help mailing list