1. My name is Bert, not Brent;
2. I am not your private consultant -- always cc the list unless you have
good reason not to. I have done that here.
It looks like this is what you want; if so, you really need to go through
an R tutorial or two to learn the basics:
d <-
structure(list(region = str
And more helpful, probably, would have been the str() function:
> str(mtcars)
'data.frame': 32 obs. of 11 variables:
$ mpg : num 21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ...
$ cyl : num 6 6 4 6 8 6 8 4 4 6 ...
$ disp: num 160 160 108 258 360 ...
$ hp : num 110 110 93 110 175 105 2
I think you are confusing row names with the first column. The first column in
mtcars is not alphanumeric:
> class(mtcars)
[1] "data.frame"
> class(mtcars[,1])
[1] "numeric"
> rownames(mtcars)
[1] "Mazda RX4" "Mazda RX4 Wag" "Datsun 710" "Hornet
4 Drive" "Hornet S
Clarification needed.
Are your data in a data frame or an alphanumeric matrix? What does it look
like?
A small reproducible example would be very useful here I think!
[1] http://stackoverflow.com/questions/5963269/how-to-make-a-
great-r-reproducible-example
[2] http://adv-r.had.co.nz/Reproducib
Dear all;
I need to run heatmap. Because my first column in my data is alphanumeric,
I can not run as.matrix(scale(my_data)). So I need to make my data readable
as in data(mtcars). In *mtcars *data the first column is alphanumeric and
has no name.
Thanks,
Greg
[[alternative HTML versio
5 matches
Mail list logo