[R] How to read data from this csv?

2010-06-18 Thread YI LIU
I am so frustrated about reading data from this sample csv file. My code is : >test=read.csv(file='test.csv',header=T) warning message: In read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'test.csv' >test [1] ÐÏ.à.. <0 ro

[R] Read data from .csv file and regression on dummy variables

2010-06-18 Thread YI LIU
Hi, I need to regress the population on time slot and also days in advance. A sample dataset is like this. I do not know whether I can attach a file in this mailing list or not. If you know how to do it, I will be happy to send you my data file. time slot days in advance US EURCHIN

[R] Read data from .csv file and regression on dummy variables

2010-06-18 Thread YI LIU
Hi, I need to regress the population on time slot and also days in advance. A sample dataset is like this. I do not know whether I can attach a file in this mailing list or not. If you know how to do it, I will be happy to send you my data file. time slot days in advance US EURCHINA

[R] How to calculate the robust standard error of the dependent variable

2010-06-18 Thread YI LIU
Hi, folks linmod=y~x+z summary(linmod) The summary of linmod shows the standard error of the coefficients. How can we get the sd of y and the robust standard errors in R? Thanks! [[alternative HTML version deleted]] __ R-help@r-project.org ma

[R] how to 'average' one col wrt to another one

2010-06-16 Thread YI LIU
Hi, folks, test=matrix(rep(letters[1:3],6),nrow=6,byrow=T) test[2,]=letters[5:7] test[4,]=c('e','f','i') test[1,3]='i' colnames(test)=c('leave','arrive','line') The code will generate a sample dataset. I have thousands rows of data. For the same 'leave' and 'arrive', how can I get the sum of squ