[BioC] matrix row/column displayed as a list
Daniel Brewer
daniel.brewer at icr.ac.uk
Fri Mar 30 16:22:46 CEST 2007
Yes I have already tried that, class(expression) is matrix. But
class(expression[1,]) is list as is class(expression[,1]). Whereas the
class of my simple constructed matrix when looking at a single row or
column is numeric i.e. class(togo[,2]).
Thanks for the suggestion anyway.
Stephen Henderson wrote:
> Are you sure expression is a matrix?
> What do you get when you type?
>
>> class(expression)
>
> have you tried:
>
>> expression<- as.matrix(expression)
>
>
> Stephen Henderson
> Wolfson Inst. for Biomedical Research
> Cruciform Bldg., Gower Street
> University College London
> United Kingdom, WC1E 6BT
> +44 (0)207 679 6827
>
>
> -----Original Message-----
> From: bioconductor-bounces at stat.math.ethz.ch
> [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Daniel
> Brewer
> Sent: 30 March 2007 14:42
> To: bioconductor at stat.math.ethz.ch
> Subject: [BioC] matrix row/column displayed as a list
>
> Hi,
>
> This is a silly little question, but I can't find the answer. I have a
> matrix of expression values e.g. expression. When I display either one
> column or one row it displays a list e.g. expression[1,] or
> expression[,1]. Is there a way to change this behaviour?
>
> When I constructed a test matrix, the matrix worked as desired i.e.
>> togo <- matrix(c(1,2,3,4),ncol=2, nrow=2)
>> togo[,1]
> [1] 1 2
> Why is the behaviour different?
>
> Many thanks
>
> Dan
The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
This e-mail message is confidential and for use by the addre...{{dropped}}
More information about the Bioconductor
mailing list