Did you mean:
> x<-matrix(runif(16),4,4,dimnames=list(sample(letters[1:4]),NULL))
> x
[,1] [,2] [,3] [,4]
a 0.5132191 0.09121766 0.9470733 0.6311042
d 0.3621340 0.43193846 0.8536142 0.9286477
c 0.8597558 0.48168800 0.2845544 0.4108180
b 0.4767520 0.72526768 0.2105142 0.667
Though R is indeed cross-platform language, how to build depends on the
environment. This is case for most cross-platform software, library,
etc. Basically cross-platform means cross-platform for users.
When you build packages, you are not user but developer.
Rtools will help you.
http://www.mur
try
hist(foo[,5])
plot(foo[,c(1,5)])
HTH
> Currently I invoke:
>
> foo <- read.table("foo.data", header=TRUE)
>
> to read a table into foo
>
> Then when I try to plot a histogram out of the 5th column of foo:
>
> hist(foo[5])
>
> It fails and it says:
>
> Error in hist.default(foo[5]) : '
you can access it as a data frame by
> av3<-av2[[1]]
then,
> dimnames(av3)[[1]]
gives you the leftmost labels, and also,
> av3$Df
> av3$Sum
etc, gives the values.
> str(object)
always help you to find out the structure of object and how to access
the information.
HTH
> I couldn'
try
master_list <- apply(x, 1, as.list)
HTH
> Dear group,
> I have a dataframe (x). (4 rows, 3 columns for
> example)
>
> I want to create a master list (my_list) from data
> frame.
>
> I want each row of x to be a list.
>
>
> I tried 3 different ways: writing a loop, using apply,
> and go
5 matches
Mail list logo