Ciao Paulo,
my.data<-read.table(stdin(),head=T,sep=",")
yy,mm,dd,C.531,C.542,C.558,C.565
2003,1,1,0.9941125,1.412338,0.8996750,2.258200
2003,1,2,1.7931375,2.786900,NA,3.108725
2003,1,3,NA,3.657775,1.7269750,2.541938
2003,1,4,1.0840625,1.766925,1.2313375,2.321300
2003,1,5,1.1558000,2.128488,0.967037
if "data" was your data.frame, data[4:length(data)] was also a
data.frame.
but, c(data[4:length(data)] ) coerces it to a list.
therefore coppie is a list.
coppie[1] is also a list of length 1...
compare that to: coppie[[1]]
b
On Feb 11, 2008, at 10:38 AM, milton ruser wrote:
Ciao Paolo,
You were asking for the length of the first element of the vector
coppie, which is of course 1. Did you mean to say lgngth(coppie)?
length(data[,4]) is asking how many elements in that column, which
seems to be 5. also your statement
coppie <- c(data[4:length(data)])
seems strange. What did yo
Ciao Milthinho
Here it is
> data
yy mm dd C.531C.542 C.558C.565
1 2003 1 1 0.9941125 1.412338 0.8996750 2.258200
2 2003 1 2 1.7931375 2.786900NA 3.108725
3 2003 1 3NA 3.657775 1.7269750 2.541938
4 2003 1 4 1.0840625 1.766925 1.231
I think that coppie is a list, so
length(coppie[[1]])
On 11/02/2008, Paolo Grillo <[EMAIL PROTECTED]> wrote:
>
>Hi all
>I have this problem:
>In my database .dta, called "data" I have five rows
>data<-read.dta("C:\\2_CO_mmobile_ALL_Rid.dta")
># From this database I wuold like
Ciao Paolo,
How about you show some row of your data?
How many columns have your data.frame? One?
By the way "data" is not a so good name for your data frame.
We will be very happy to help you
Kindly,
Miltinho
Brasile
On 2/11/08, Paolo Grillo <[EMAIL PROTECTED]> wrote:
>
>
> Hi all
> I hav
Hi all
I have this problem:
In my database .dta, called "data" I have five rows
data<-read.dta("C:\\2_CO_mmobile_ALL_Rid.dta")
# From this database I wuold like to create another
coppie<-c(data[4:length(data)])
but I find this
# Length of original data
length(data[,4]
7 matches
Mail list logo