[R] Please Help
Hello, I got this email address from http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2516.html, I got started to use R recently, Can I ask you a question ? this is what I am using: platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 4.0 year 2006 month 10 day03 svn rev39566 language R version.string R version 2.4.0 (2006-10-03) I wanna to call R in shell( bash ) , write all R commands in the shell script and make it a cron job to execute automatically. do you know how to do this ? Looking forward to hearing from you, thanks a million. Tanya Li -- Regards Xiaohui Li [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Please Help
This is the R-help mailing list. See help(BATCH). You will need to write the required R commands in a separate script, say script.R and then execute it as R --no-save script.R logfile You may need to augment the code above to include directory paths etc. There are other useful documentations at http://www.r-project.org/ Regards, Adai Tanya Li wrote: Hello, I got this email address from http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2516.html, I got started to use R recently, Can I ask you a question ? this is what I am using: platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 4.0 year 2006 month 10 day03 svn rev39566 language R version.string R version 2.4.0 (2006-10-03) I wanna to call R in shell( bash ) , write all R commands in the shell script and make it a cron job to execute automatically. do you know how to do this ? Looking forward to hearing from you, thanks a million. Tanya Li __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Please help with legend command
Smith, Phil (CDC/CCID/NCIRD) wrote: Hi R-ers: I'm drawing a plot and have used different line types (lty) for different race/ethnicity groups. I want a legend that explains what line types correspond to the different race/ethnicity groups. I used the following code: legend( 1992 , 42 , c(Hispanic , non-Hispanic white (NHW) , non-Hispanic black , AI/AN , Asian ) , lty=1:5 ,cex = .6 , bty='n' ) Guess what? The legend box was so narrow that the line types that show up in that legend box look essentially the same, because they are short. I.e, although a line type might be a long dash followed by a short dash, only the long dash shows up in the box. The consequence of this is that the race/ethnic group that corresponds to the line type that is only a long dash cannot be distinguished from the legend. How do I stretch that legend box out so as to allow lty to draw longer line segments? Hi Phil, A quick hack is to get a copy of the function: sink(newlegend.R) legend sink() Get the file into a text editor and first get rid of the environment: namespace:graphics at the bottom, then change line 161 to: w0 - w0 + (4 + x.off) * xchar and line 212 to: seg.len - 4 source the new function: source(newlegend.R) and your line segments will be twice as long. Jim __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Please help with legend command
Hi R-ers: I'm drawing a plot and have used different line types (lty) for different race/ethnicity groups. I want a legend that explains what line types correspond to the different race/ethnicity groups. I used the following code: legend( 1992 , 42 , c(Hispanic , non-Hispanic white (NHW) , non-Hispanic black , AI/AN , Asian ) , lty=1:5 ,cex = .6 , bty='n' ) Guess what? The legend box was so narrow that the line types that show up in that legend box look essentially the same, because they are short. I.e, although a line type might be a long dash followed by a short dash, only the long dash shows up in the box. The consequence of this is that the race/ethnic group that corresponds to the line type that is only a long dash cannot be distinguished from the legend. How do I stretch that legend box out so as to allow lty to draw longer line segments? Please reply to: [EMAIL PROTECTED] Many thanks! Phil Smith Centers for Disease Control and Prevention __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Please help.... i know its trivial
Patrick Callier napsal(a): rownames is the command you want, I think. rownames(A) - seq(1:8) Yes. More generally rownames(A) - 1:length(A[,1]) And keep in mind that nobody is going to help you next time, if you won't give a clear and informative SUBJECT in your message. Here it should have been something like 'wrong row names in subset' or 'dataframe subset question' etc, certainly not 'please help me, it's trivial'... Btw, there is something like the posting guide for this list (see footer). Petr -- Petr Klasterecky Dept. of Probability and Statistics Charles University in Prague Czech Republic __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Please help.... i know its trivial
Hi All R Experts, Please help me. Query is given at the end of this R Session +start of R Session+++ SCORES-read.csv(C:/SCORE.csv,header=TRUE,sep=,) SCORES SrNo Player Score 1 1 A12 2 2 B23 3 3 C34 4 4 A54 + 17 17 A 433 18 18 B32 19 19 B34 20 20 C34 A-subset(SCORES,Player==A) A SrNo Player Score 1 1 A12 4 4 A54 5 5 A 342 6 6 A45 9 9 A45 10 10 A34 11 11 A65 17 17 A 433 class(SCORES) [1] data.frame class(A) [1] data.frame +end of R Session++ question:- I want to convert the above given data frame i.e. A into a data frame like this given below. So that my indexing looks good. SrNo Player Score 1 1 A12 2 4 A54 3 5 A 342 4 6 A45 5 9 A45 6 10 A34 7 11 A65 8 17 A 433 Please help :-) Or give me some pointers i have tries searching the R FAQs also but i could not locate. I know its trivial. DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Please help.... i know its trivial
rownames is the command you want, I think. rownames(A) - seq(1:8) Try that. Pat On 4/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All R Experts, Please help me. Query is given at the end of this R Session +start of R Session+++ SCORES-read.csv(C:/SCORE.csv,header=TRUE,sep=,) SCORES SrNo Player Score 1 1 A12 2 2 B23 3 3 C34 4 4 A54 + 17 17 A 433 18 18 B32 19 19 B34 20 20 C34 A-subset(SCORES,Player==A) A SrNo Player Score 1 1 A12 4 4 A54 5 5 A 342 6 6 A45 9 9 A45 10 10 A34 11 11 A65 17 17 A 433 class(SCORES) [1] data.frame class(A) [1] data.frame +end of R Session++ question:- I want to convert the above given data frame i.e. A into a data frame like this given below. So that my indexing looks good. SrNo Player Score 1 1 A12 2 4 A54 3 5 A 342 4 6 A45 5 9 A45 6 10 A34 7 11 A65 8 17 A 433 Please help :-) Or give me some pointers i have tries searching the R FAQs also but i could not locate. I know its trivial. DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] please help me for svm plot question
I run the following code, all other is ok, but plot(m.svm,p5.new,As~Cur) is not ok Anyone know why? install.packages(e1071) library(e1071) library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) - list(Out=c(1), In=c(0)) attach(p5.new) m.svm-svm(Y~P+Aa+As+Cur,data=p5.new) summary(m.svm) plot(m.svm,p5.new,As~Cur) Here is output: install.packages(e1071) --- Please select a CRAN mirror for use in this session --- trying URL 'http://rh-mirror.linux.iastate.edu/CRAN/bin/windows/contrib/2.4/e1071_1.5-16.zip' Content type 'application/zip' length 592258 bytes opened URL downloaded 578Kb package 'e1071' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Documents and Settings\aiminy\Local Settings\Temp\RtmpY0B2qb\downloaded_packages updating HTML package descriptions library(e1071) Loading required package: class library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) - list(Out=c(1), In=c(0)) attach(p5.new) m.svm-svm(Y~P+Aa+As+Cur,data=p5.new) summary(m.svm) Call: svm(formula = Y ~ P + Aa + As + Cur, data = p5.new) Parameters: SVM-Type: C-classification SVM-Kernel: radial cost: 1 gamma: 0.04 Number of Support Vectors: 758 ( 382 376 ) Number of Classes: 2 Levels: Out In plot(m.svm,p5.new,As~Cur) Error in scale(newdata[, object$scaled, drop = FALSE], center = object$x.scale$scaled:center, : (subscript) logical subscript too long __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] please help me for svm plot question
I run the following code, all other is ok, but plot(m.svm,p5.new,As~Cur) is not ok Anyone know why? install.packages(e1071) library(e1071) library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) - list(Out=c(1), In=c(0)) attach(p5.new) m.svm-svm(Y~P+Aa+As+Cur,data=p5.new) summary(m.svm) plot(m.svm,p5.new,As~Cur) Here is output: install.packages(e1071) --- Please select a CRAN mirror for use in this session --- trying URL 'http://rh-mirror.linux.iastate.edu/CRAN/bin/windows/contrib/2.4/e1071_1.5-16.zip' Content type 'application/zip' length 592258 bytes opened URL downloaded 578Kb package 'e1071' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Documents and Settings\aiminy\Local Settings\Temp\RtmpY0B2qb\downloaded_packages updating HTML package descriptions library(e1071) Loading required package: class library(MASS) p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;) p5.new-subset(p5,select=-Ms) p5.new$Y-factor(p5.new$Y) levels(p5.new$Y) - list(Out=c(1), In=c(0)) attach(p5.new) m.svm-svm(Y~P+Aa+As+Cur,data=p5.new) summary(m.svm) Call: svm(formula = Y ~ P + Aa + As + Cur, data = p5.new) Parameters: SVM-Type: C-classification SVM-Kernel: radial cost: 1 gamma: 0.04 Number of Support Vectors: 758 ( 382 376 ) Number of Classes: 2 Levels: Out In plot(m.svm,p5.new,As~Cur) Error in scale(newdata[, object$scaled, drop = FALSE], center = object$x.scale$scaled:center, : (subscript) logical subscript too long __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Please HELP: Problem with BUILD command
Greetings, I am unable to successfully BUILD due to a file that apears to be too long. I know it it due to the length of a particular R program because if I remove a line, even a comment line, from the file it then successfully builds. However, if I add the line back in, the build fails. The file is only 14Kb long. Any help or suggestions are greatly appreciated. Thank you for your time. John Zajd Constella Group Raleigh, NC 919 313-7746 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Please HELP: Problem with BUILD command
As we have said to you before, we need a reproducible example, and it is very likely that you are speculating. There is no 'BUILD' command in R: do you mean 'R CMD build'? If so, that does not parse any `R program'. On Mon, 31 Jul 2006, Zajd, John wrote: Greetings, I am unable to successfully BUILD due to a file that apears to be too long. I know it it due to the length of a particular R program because if I remove a line, even a comment line, from the file it then successfully builds. However, if I add the line back in, the build fails. The file is only 14Kb long. Any help or suggestions are greatly appreciated. Thank you for your time. John Zajd Constella Group Raleigh, NC 919 313-7746 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Please HELP: Problem with BUILD command
Zajd, John wrote: Greetings, I am unable to successfully BUILD due to a file that apears to be too long. I know it it due to the length of a particular R program because if I remove a line, even a comment line, from the file it then successfully builds. However, if I add the line back in, the build fails. The file is only 14Kb long. Strange. Can you make this file available, please? Uwe Ligges Any help or suggestions are greatly appreciated. Thank you for your time. John Zajd Constella Group Raleigh, NC 919 313-7746 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Please help me to combine two datasets.
Dear r-users, Suppose I have two data sets data set-1 Date height 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight 32 45 11 Now I want to combine this two data sets. i.e. i want to see: Date height weight --- 3/11/2005 54 32 4/11/2005 21 45 5/11/2005 22 11 Can any one give me the required r-code to perform this? Thanks and regards, Arun [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help me to combine two datasets.
?merge maybe is what you want. 2006/5/11, Arun Kumar Saha [EMAIL PROTECTED]: Dear r-users, Suppose I have two data sets data set-1 Date height 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight 32 45 11 Now I want to combine this two data sets. i.e. i want to see: Date height weight --- 3/11/2005 54 32 4/11/2005 21 45 5/11/2005 22 11 Can any one give me the required r-code to perform this? Thanks and regards, Arun [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- 黄荣贵 Deparment of Sociology Fudan University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help me to combine two datasets.
merge(data.set.1, data.set.2) but how do I know which rows to drop in ds1? if data.set.2 had dates, you could say merge(data.set.1, data.set.2, by.x=Date, by.y=Date, all=T) or do you just want to drop the first length(data.set.1)-length(data.set.2) from data.set.1? do you have NA values? cheers, Sean On 11/05/06, Arun Kumar Saha [EMAIL PROTECTED] wrote: Dear r-users, Suppose I have two data sets data set-1 Date height 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight 32 45 11 Now I want to combine this two data sets. i.e. i want to see: Date height weight --- 3/11/2005 54 32 4/11/2005 21 45 5/11/2005 22 11 Can any one give me the required r-code to perform this? Thanks and regards, Arun [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help me to combine two datasets.
Hi Arun, so to clarify: you want to drop the first length(data.set.1)-length(data.set.2) rows... so you might say... new.ds1 - data.set.1[(-(length(data.set.1)-length(data.set.2)),] and then add a new column... new.ds.combined - cbind(new.ds1, data.set.2) cheers, Sean On 11/05/06, Arun Kumar Saha [EMAIL PROTECTED] wrote: Dear Sean, Thanks for this reply. But my problem is not solved. Actually I want to drop first two rows from dataset-1 and then combine them. Can you give me any idea? Thanks and regards, Arun On 5/11/06, Sean O'Riordain [EMAIL PROTECTED] wrote: merge(data.set.1, data.set.2) but how do I know which rows to drop in ds1? if data.set.2 had dates, you could say merge(data.set.1, data.set.2, by.x=Date, by.y=Date, all=T) or do you just want to drop the first length(data.set.1)-length(data.set.2) from data.set.1? do you have NA values? cheers, Sean On 11/05/06, Arun Kumar Saha [EMAIL PROTECTED] wrote: Dear r-users, Suppose I have two data sets data set-1 Date height 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight 32 45 11 Now I want to combine this two data sets. i.e. i want to see: Date height weight --- 3/11/2005 54 32 4/11/2005 21 45 5/11/2005 22 11 Can any one give me the required r-code to perform this? Thanks and regards, Arun [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Arun Kumar Saha, M.Sc.[C.U.] S T A T I S T I C I A N[Analyst] RISK MANAGEMENT DIVISION Transgraph Consulting [ www.transgraph.com] Hyderabad, INDIA Contact # Home: (91-033) 25558038 Office: (91-040) 30685012 Ext. 17 FAX: (91-040) 55755003 Mobile: 919849957010 E-Mail: [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Please help on correlation matrix
hi everyone, Suppose I have three variables a, b, and c each with 10 values. Now I construct a corr matrix for them. Now I want to give the names of columns of corr matrix as a, b, c, i.e. the first column of corr matrix will have name as a second column with b and so on. Can anyone give me any code by which I can automatically assign the names of columns of corr matrix which are originally the names of variables? For example suppose next we have 5 variables r1 .r5. I want to see the names of columns of corr matrix as r1.r5. Thanks in advance - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help on correlation matrix
On 25-Mar-06 stat stat wrote: hi everyone, Suppose I have three variables a, b, and c each with 10 values. Now I construct a corr matrix for them. Now I want to give the names of columns of corr matrix as a, b, c, i.e. the first column of corr matrix will have name as a second column with b and so on. Can anyone give me any code by which I can automatically assign the names of columns of corr matrix which are originally the names of variables? For example suppose next we have 5 variables r1...r5. I want to see the names of columns of corr matrix as r1...r5. One of the following, or similar, does what you want. No? X-cbind(rnorm(10),rnorm(10),rnorm(10)) colnames(X)-c(a,b,c) cor(X) a b c a 1.000 0.29895042 0.19601719 b 0.2989504 1. -0.04794445 c 0.1960172 -0.04794445 1. a-rnorm(10);b-rnorm(10);c-rnorm(10);X-cbind(a,b,c) cor(X) a b c a 1.000 0.2825758 -0.7605892 b 0.2825758 1.000 -0.2322451 c -0.7605892 -0.2322451 1.000 Hoping this helps, Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 25-Mar-06 Time: 12:54:58 -- XFMail -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help on correlation matrix
This works as long as you have no more than 26 variables. Suppose your correlation matrix is x. x - cor(iris[,-5]) # test data rownames(x) - colnames(x) - letters[1:ncol(x)] On 3/25/06, stat stat [EMAIL PROTECTED] wrote: hi everyone, Suppose I have three variables a, b, and c each with 10 values. Now I construct a corr matrix for them. Now I want to give the names of columns of corr matrix as a, b, c, i.e. the first column of corr matrix will have name as 'a' second column with 'b' and so on. Can anyone give me any code by which I can automatically assign the names of columns of corr matrix which are originally the names of variables? For example suppose next we have 5 variables r1….r5. I want to see the names of columns of corr matrix as r1.r5. Thanks in advance - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help me.....
Fernando Espíndola wrote: Hi user R, I am try to calculate the spectrum function in two time series. But when plot a single serie, the labels in axes x is in the range 0.1 to 0.6 (frequency), but when calculate de spectrum with ts.union function, the labels x is in the range 1 to 6. I not understand why change the labels, and not know that is ralationship. Samebody can hel me in this analysis. Not so for me. As the posting guide asks you to do: Can you specify a reproducible example, please. Uwe Ligges Thank for all fdo Fernando Espindola R. Division Investigacion Pesquera Instituto de Fomento Pesquero Blanco 839 Valparaiso - CHILE fono: 32 - 322442 [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help me.....
Dear Fernando Please read the posting guide. If you want to get an answer to your question you need to be specific about your analysis, and provide examples of the data structure and code that you tried and didn't work. Francisco -- Español Estimado Fernando Por favor lee la guía de publicación de preguntas en el foro. Si quieres recibir una respuesta tienes que especificar los análisis que utilizaste y dar ejemplos con la estructura de tus datos y el código que no funcionó. Francisco From: Fernando Espíndola [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] Please help me. Date: Tue, 12 Jul 2005 18:42:14 -0400 Hi user R, I am try to calculate the spectrum function in two time series. But when plot a single serie, the labels in axes x is in the range 0.1 to 0.6 (frequency), but when calculate de spectrum with ts.union function, the labels x is in the range 1 to 6. I not understand why change the labels, and not know that is ralationship. Samebody can hel me in this analysis. Thank for all fdo Fernando Espindola R. Division Investigacion Pesquera Instituto de Fomento Pesquero Blanco 839 Valparaiso - CHILE fono: 32 - 322442 [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Please help me.....
Hi user R, I am try to calculate the spectrum function in two time series. But when plot a single serie, the labels in axes x is in the range 0.1 to 0.6 (frequency), but when calculate de spectrum with ts.union function, the labels x is in the range 1 to 6. I not understand why change the labels, and not know that is ralationship. Samebody can hel me in this analysis. Thank for all fdo Fernando Espindola R. Division Investigacion Pesquera Instituto de Fomento Pesquero Blanco 839 Valparaiso - CHILE fono: 32 - 322442 [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Please help me update my address book on Ringo
undefined [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] final stages of installing R - please help?
Hello, This morning I downloaded, unzipped, and compiled the latest version of R for unix, in my HOME/APPLICATIONS directory. My current unix machine is a sparc-sun-solaris2.9, running SunOS 5.9. Here are the last few lines of the output following ./configure: R is now configured for sparc-sun-solaris2.9 Source directory: . Installation directory:/usr/local C compiler:/usr/local/bin/gcc -g -O2 C++ compiler: g++ Fortran compiler: /usr/local/bin/g77 -g -O2 Interfaces supported: X11 External libraries: Additional capabilities: Options enabled: R profiling Recommended packages: yes Then I checked my HOME/APPLICATIONS directory and indeed following the compiling, I now had a new bin directory: HOME/APPLICATIONS/R-2.0.1/bin And within the bin, I had many new files including an executable (theoretically) R file: -rwxr-xr-x 1 root6099 Mar 29 13:18 R I then ran 'make'. Here are the last few lines from the 'make' output to the screen: rm -f libappl.a false cr libappl.a approx.o bakslv.o bandwidths.o binning.o chull.o cpoly.o cumsum.o fft.o fmin.o integrate.o interv.o lbfgsb.o loglin.o lowess.o machar.o maxcol.o massdist.o pretty.o rcont.o rowsum.o splines.o stem.o strsignif.o tabulate.o uncmin.o zeroin.o ch2inv.o chol.o dchdc.o dpbfa.o dpbsl.o dpoco.o dpodi.o dpofa.o dposl.o dqrdc.o dqrdc2.o dqrls.o dqrsl.o dqrutl.o dsvdc.o dtrco.o dtrsl.o eigen.o lminfl.o blas.o zgemm.o make[3]: *** [libappl.a] Error 1 make[3]: Leaving directory `/home/gruen/Applications/R-2.0.1/src/appl' make[2]: *** [R] Error 2 make[2]: Leaving directory `/home/gruen/Applications/R-2.0.1/src/appl' make[1]: *** [R] Error 1 make[1]: Leaving directory `/home/gruen/Applications/R-2.0.1/src' make: *** [R] Error 1 I then ran 'make check'. Here is the output: # /usr/local/bin/make check make[1]: Entering directory `/home/gruen/Applications/R-2.0.1/tests' make[2]: Entering directory `/home/gruen/Applications/R-2.0.1/tests' make[3]: Entering directory `/home/gruen/Applications/R-2.0.1/tests/Examples' make[4]: Entering directory `/home/gruen/Applications/R-2.0.1/tests/Examples' make[4]: Leaving directory `/home/gruen/Applications/R-2.0.1/tests/Examples' make[4]: Entering directory `/home/gruen/Applications/R-2.0.1/tests/Examples' make[4]: *** No rule to make target `../../bin/exec/R', needed by `base-Ex.Rout'. Stop. make[4]: Leaving directory `/home/gruen/Applications/R-2.0.1/tests/Examples' make[3]: *** [test-Examples-Base] Error 2 make[3]: Leaving directory `/home/gruen/Applications/R-2.0.1/tests/Examples' make[2]: *** [test-Examples] Error 2 make[2]: Leaving directory `/home/gruen/Applications/R-2.0.1/tests' make[1]: *** [test-all-basics] Error 1 make[1]: Leaving directory `/home/gruen/Applications/R-2.0.1/tests' make: *** [check] Error 2 I was not sure if the errors were important so I tried additional 'make check' operations: # /usr/local/bin/make check FORCE=FORCE make: Nothing to be done for `check'. # /usr/local/bin/make check-devel make: *** No rule to make target `check-devel'. Stop. # /usr/local/bin/make check-all make: *** No rule to make target `check-all'. Stop. Then I relogged on and tried to execute 'R' in my bin, as either myself or even root, but got the same message: gruen@/home/gruen% R /usr/local/bin/R: /home/gruen/Applications/R-2.0.1/bin/exec/R: not found But it does not execute. Any thoughts? Thank you! Jeff Gruen [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] final stages of installing R - please help?
Jeffrey Gruen, M.D. [EMAIL PROTECTED] writes: Hello, This morning I downloaded, unzipped, and compiled the latest version of R for unix, in my HOME/APPLICATIONS directory. My current unix machine is a sparc-sun-solaris2.9, running SunOS 5.9. Here are the last few lines of the output following ./configure: R is now configured for sparc-sun-solaris2.9 Source directory: . Installation directory:/usr/local C compiler:/usr/local/bin/gcc -g -O2 C++ compiler: g++ Fortran compiler: /usr/local/bin/g77 -g -O2 Interfaces supported: X11 External libraries: Additional capabilities: Options enabled: R profiling Recommended packages: yes Then I checked my HOME/APPLICATIONS directory and indeed following the compiling, I now had a new bin directory: HOME/APPLICATIONS/R-2.0.1/bin And within the bin, I had many new files including an executable (theoretically) R file: -rwxr-xr-x 1 root6099 Mar 29 13:18 R I then ran 'make'. Here are the last few lines from the 'make' output to the screen: rm -f libappl.a false cr libappl.a approx.o bakslv.o bandwidths.o binning.o chull.o cpoly.o cumsum.o fft.o fmin.o integrate.o interv.o lbfgsb.o loglin.o lowess.o machar.o maxcol.o massdist.o pretty.o rcont.o rowsum.o splines.o stem.o strsignif.o tabulate.o uncmin.o zeroin.o ch2inv.o chol.o dchdc.o dpbfa.o dpbsl.o dpoco.o dpodi.o dpofa.o dposl.o dqrdc.o dqrdc2.o dqrls.o dqrsl.o dqrutl.o dsvdc.o dtrco.o dtrsl.o eigen.o lminfl.o blas.o zgemm.o make[3]: *** [libappl.a] Error 1 make[3]: Leaving directory `/home/gruen/Applications/R-2.0.1/src/appl' make[2]: *** [R] Error 2 make[2]: Leaving directory `/home/gruen/Applications/R-2.0.1/src/appl' make[1]: *** [R] Error 1 make[1]: Leaving directory `/home/gruen/Applications/R-2.0.1/src' make: *** [R] Error 1 Looks like it couldn't find the ar program and set it to false. I don't quite understand why configure allows itself to complete in that case, but the basic problem could be that you don't have your PATH set right. I believe the standard version sits in /usr/ccs/bin. I then ran 'make check'. Won't do anything useful if you haven't built R succesfully first. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Please help using SQL with R SQL Server
I cannot get a database connection in R to my MS SQL Server database. In S-Plus 6.2 I have used the following successfully: rawdata - importData(type=DIRECT-SQL, user=xfl2, password=xfl2, server=rinnycs0059, database=xf, table=, sqlQuery=select * from testTbl) In R I have tried both DBI and RSQLite, but have not had any luck. It always says cannot find driver. All the examples use My SQL or some other program. I only have SQL Server by Microsoft. I know R might not have a native driver, but I have tried ODBC, too, without luck. If anyone can give me an example and hints on finding the driver that would be great! Thanks. Roger ** * This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by any error in transmission. If you have received this message in error, please immediately notify the sender by e-mail, delete the message and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] please help with estimation of true correlations and reliabilities
Dear John, I checked for the uniquenesses from factanal() and found out that these estimates need an a priori assumption about the number of latent factors (and they depend strongly on that assumption). What I want is an estimate of reliablity independent of such an assumption. Is it possible to specify such structure to sem or another SEM software? (no assumption about number of factors, no assumptions about which variables group together). Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] please help with estimation of true correlations and reliabilities
Dear Jens, One of the nice features of maximum-likelihood factor analysis, implemented in factanal(), is that you can test for the number of common factors. More generally, the estimated uniquenesses will depend upon the number of common factors. Using sem() requires a stronger initial specification -- not only the number of common factors, but a prior specification of which variables load on each. If you make the model too general, it won't be identified. Furthermore, although I suggested that you use the uniquenesses to assess unreliability, the justification for this is clearest in models in which each variable loads on just one factor. I guess it would help to know a bit more about the application. Regards, John -Original Message- From: Jens Oehlschlägel [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:52 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [R] please help with estimation of true correlations and reliabilities Dear John, I checked for the uniquenesses from factanal() and found out that these estimates need an a priori assumption about the number of latent factors (and they depend strongly on that assumption). What I want is an estimate of reliablity independent of such an assumption. Is it possible to specify such structure to sem or another SEM software? (no assumption about number of factors, no assumptions about which variables group together). Best regards Jens Oehlschlägel __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] please help with estimation of true correlations andreliabilities
Dear John, Dear Joseph, Thank you for your quick answers and the pointer to semnet. I try to clarify on my assumptions: - yes, I am willing to assume multivariate normality - no, I don't want to assume a single factor model - I assume there is an unknown number of factors, and I do not know which items belong to which factors but I still want to estimate single item reliabilities Is this impossible? How can one specify such unspecified model to sem? Which (exploratory?) function would me help doing this? Or just: what should I read? Thanks for any help Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] please help with estimation of true correlations and reliabilities
Can someone point me to literature and/or R software to solve the following problem: Assume n true scores t measured as x with uncorrelated errors e , i.e. x = t + e and assume each true score to a have a certain amount of correlation with some of the other true scores. The correlation matrix cx of x will have its off-diagonal entries reduced by measurement error compared to the true correlation matrix ct of t, however the diagonal entries remain without attenuation. Consequently the correlation matrix of observed variables has different things on- and off-diagonal. I would like to estimate 1) the true correlation matrix ct 2) the measurement reliabilities rxx, i.e. the correlation of a score with itself attenuated by its measurement error (as if we had two measurements of the same score). but I don't have predefined asumptions about structure in the variable set as I guess would be needed for SEM. Is R software available to do this? Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] please help with estimation of true correlations andreliabilities
Dear Jens, It sounds as if you're postulating a single-factor model underlying the x's (which is an assumption about the structure of the variables). If that's the case, then you could either use the factanal function in the stats package or the sem function in the sem package to estimate the model. The former would be simpler. I hope this helps, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jens Oehlschlägel Sent: Thursday, May 13, 2004 4:06 AM To: [EMAIL PROTECTED] Subject: [R] please help with estimation of true correlations andreliabilities Can someone point me to literature and/or R software to solve the following problem: Assume n true scores t measured as x with uncorrelated errors e , i.e. x = t + e and assume each true score to a have a certain amount of correlation with some of the other true scores. The correlation matrix cx of x will have its off-diagonal entries reduced by measurement error compared to the true correlation matrix ct of t, however the diagonal entries remain without attenuation. Consequently the correlation matrix of observed variables has different things on- and off-diagonal. I would like to estimate 1) the true correlation matrix ct 2) the measurement reliabilities rxx, i.e. the correlation of a score with itself attenuated by its measurement error (as if we had two measurements of the same score). but I don't have predefined asumptions about structure in the variable set as I guess would be needed for SEM. Is R software available to do this? Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] please help with estimation of true correlations and reli abilities
Jens I'm not sure what you intend by predefined assumptions. 1. If you merely want to conduct an exploratory rather than confirmatory analysis for the relevant paths, there are ways within SEM to do this. (In this case you could use John Fox's SEM package). 2. If you do not wish to assume multivariate normality, then you may use a variety of alternative (to maximum likelihood) estimation algorithms available in most SEM programs. 3. If you do not wish to assume either the outcome variable or the latent variable is continuous, there are SEM programs for this (Mplus being the most prominent.) 4. If you do not wish to assume the true score is a linear function (or generalized linear function for categorical variables) of the attribute being measured, then you have a more difficult problem. If presume you are familiar with SEMnet at http://www.gsu.edu/~mkteer/semnet.html. Joe -Original Message- From: Jens Oehlschlägel [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:06 AM To: [EMAIL PROTECTED] Subject: [R] please help with estimation of true correlations and reliabilities Can someone point me to literature and/or R software to solve the following problem: Assume n true scores t measured as x with uncorrelated errors e , i.e. x = t + e and assume each true score to a have a certain amount of correlation with some of the other true scores. The correlation matrix cx of x will have its off-diagonal entries reduced by measurement error compared to the true correlation matrix ct of t, however the diagonal entries remain without attenuation. Consequently the correlation matrix of observed variables has different things on- and off-diagonal. I would like to estimate 1) the true correlation matrix ct 2) the measurement reliabilities rxx, i.e. the correlation of a score with itself attenuated by its measurement error (as if we had two measurements of the same score). but I don't have predefined asumptions about structure in the variable set as I guess would be needed for SEM. Is R software available to do this? Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] please help with estimation of true correlations andreliabilities
Dear Jens, If you're willing to assume multinormality but don't have in mind a specific model to estimate, then why not use factanal? The uniquenesses are estimates of the unreliability of the items. I hope this helps, John On Thu, 13 May 2004 17:09:14 +0200 (MEST) Jens Oehlschlägel [EMAIL PROTECTED] wrote: Dear John, Dear Joseph, Thank you for your quick answers and the pointer to semnet. I try to clarify on my assumptions: - yes, I am willing to assume multivariate normality - no, I don't want to assume a single factor model - I assume there is an unknown number of factors, and I do not know which items belong to which factors but I still want to estimate single item reliabilities Is this impossible? How can one specify such unspecified model to sem? Which (exploratory?) function would me help doing this? Or just: what should I read? Thanks for any help Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] please help me!
hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I have made sure that my working directory is the same as the place where the file is. I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, Mike __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] please help me!
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, January 30, 2004 5:19 AM To: [EMAIL PROTECTED] Subject: [R] please help me! hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' How did you get this error message? It would help if you put your codes here. But I'm guessing it is because you typed something like: foo = read.table(C:\MikeWeather2.txt) Try to use C:/MikeWeather2.txt or C:\\MikeWeather2.txt. HTH. Kevin Ko-Kang Kevin Wang, MSc(Hon) Statistics Workshops Co-ordinator Student Learning Centre University of Auckland New Zealand __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: file names under Windows [was: [R] please help me!]
If I may make a suggestion, it helps if you use informative subject lines in your email to a high-traffic list like this. [EMAIL PROTECTED] writes: hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I have made sure that my working directory is the same as the place where the file is. I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, I always find it tedious to remember how to write file names in Windows (there are rules about '\' and '/' characters) so I use the file.choose() function, which brings up a chooser panel. Although you haven't said what you want to do with the file, let's assume you are going to source some R code in the file. Then you could use source(file.choose()) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] please help me!
If your working directory contains a file you want to read then the following should work: dat - read.table(filename.txt) If you want to use absolute paths, you have to be careful with the '\' because that is an escape character... so try: dat - read.table(c:/some/path/notice/forward/slashes/data.txt) # or dat - read.table(c:\\double\\back\\should\\work\\data.txt) On Thu, Jan 29, 2004 at 09:19:23AM -0700, [EMAIL PROTECTED] wrote: hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I have made sure that my working directory is the same as the place where the file is. I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, Mike __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] please help me!
See the rw-FAQ Q2.14 R can't find my file, but I know it is there! I'd be interested to know why you didn't find that -- the posting guide does ask you to read the rw-FAQ, so I presume there is connection that is not obvious to you. On Thu, 29 Jan 2004 [EMAIL PROTECTED] wrote: hello there, I'm a new user to R and I am having difficulty reading a file into the program. Here's the error I keep getting, I bet there's a simple solution, but I cant find any... Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `c:MikeWeather2.txt' I guess a \ is missing there, as addressed in Q2.14. I have made sure that my working directory is the same as the place where the file is. In that case you don't need c:, do you? I have also tried using the full path name of the file. read.table, read.delim, read.csv, and scan have all been attempted with no result. What causes this message, and how can I fix it. Thanks in advance for your help, -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: file names under Windows [was: [R] please help me!]
On 29 Jan 2004 14:20:26 -0600, you wrote: I always find it tedious to remember how to write file names in Windows (there are rules about '\' and '/' characters) so I use the file.choose() function, which brings up a chooser panel. Although you haven't said what you want to do with the file, let's assume you are going to source some R code in the file. Then you could use source(file.choose()) I've occasionally thought that file = file.choose() would be better than no default in a lot of functions that take filenames as arguments, e.g. file, the read* and write* functions, the bitmap device, Sweave, etc. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Please help with \usage{} for [.S3Class in Rd-Format
Dear all, I try to submit a library to CRAN but can't overcome the last R CMD CHECK. Can someone enlighten me how to put the \usage{} section for an S3-Method extractor defined as args(get([.refdata)) function (x, i = NULL, j = NULL, drop = FALSE, ref = FALSE) NULL I read the Writing R Extensions manual and know about \methods{generic}{class}, however I don't get it right. Please help Jens -- Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Please help with \usage{} for [.S3Class in Rd-Format
I think you may be trying too hard. Look at Extract.data.frame.Rd and Extract.factor.Rd. I would just have an Extract.refdata.Rd. You only need the \methods{generic}{class} notation when you want to document a generic and a method, or more than one method, in the same help file. And at present the Perl conversion does not cope with regexp characters in function names On Thu, 22 Jan 2004, Jens Oehlschlägel wrote: Dear all, I try to submit a library to CRAN but can't overcome the last R CMD CHECK. Can someone enlighten me how to put the \usage{} section for an S3-Method extractor defined as args(get([.refdata)) function (x, i = NULL, j = NULL, drop = FALSE, ref = FALSE) NULL I read the Writing R Extensions manual and know about \methods{generic}{class}, however I don't get it right. Please help Jens -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] please help me on this problem
Dear all: I am totally new to R, actually, statistics software.I get two very simple, even stupid question: 1) where I should put the data file in order to use it , I tried to build a work dir in library( package:base) and save the text file (data) there, then, I use read.table(filename), not work; I tried the full path, still not work. I must have done something wrong. 2) is it possible to create a data file in R instead of put data in a txt file and then save the file under R? I tried to find answer from the introduction, failed. I really appreciate your help, thank you very much. best __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] please help me on this problem
Yong Wang wrote: Dear all: I am totally new to R, actually, statistics software.I get two very simple, even stupid question: 1) where I should put the data file in order to use it , I tried to build a work dir in library( package:base) and save the text file (data) there, I'm not sure where such a work directory might be, but it sounds like you need to show a TA what you did. It sounds like you need to carefully read the FAQ. help.start() the follow the Frequently Asked Questions link, and (if you're using R on windows) the FAQ for Windows Port then, I use read.table(filename), not work; I tried the full path, still not work. I must have done something wrong. Quite likely. But without more details, there's no way to say more. There isn't only one way to make a mistake, so there isn't one answer to it didn't work. Read the FAQ. It really does help. Read it carefully, and not in a frame of mind where you're saying to yourself I'll never understand this, this can't possibly help. You will, it can. 2) is it possible to create a data file in R instead of put data in a txt file and then save the file under R? Yes, after you've got a grip on the above. *After* the above is clear, read the help pages for save and load. Read the FAQ. I tried to find answer from the introduction, failed. But not the FAQ, presumably. I really appreciate your help, thank you very much. No problem. By the way, read the FAQ. Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] please help me on this problem
See the section called Basic method in http://www.psych.upenn.edu/~baron/rpsych/rpsych.html On 10/05/03 05:00, Yong Wang wrote: Dear all: I am totally new to R, actually, statistics software.I get two very simple, even stupid question: 1) where I should put the data file in order to use it , I tried to build a work dir in library( package:base) and save the text file (data) there, then, I use read.table(filename), not work; I tried the full path, still not work. I must have done something wrong. I'm surprised that it didn't work with the full path. I assume the error message indicated that it could not find the file, as opposed to some other sort of error. Relative paths work too. You don't say what operating system you are using, and it probably matters. But on Linux/Unix I usually start R from the directory where the data files are, and I have several of these for different projects. (Actually I use ESS, so I start R from within (X)emacs. When I say alt-x, R, I'm asked for a directory, and, if I'm not already in that directory, I enter it using a relative path name.) In sum, at least in Unix/Linux, you can put your data anywhere, and either you start R from where the data are or you use a relative or full path name. 2) is it possible to create a data file in R instead of put data in a txt file and then save the file under R? Yes, but this isn't the best way to do things unless the data file is pretty small. You can use c(). It is sometimes helpful to use matrix() with the argument horiz=T as in Example 2 in Advanced analysis of variance examples in http://www.psych.upenn.edu/~baron/rpsych/rpsych.html See also scan() - that is, look at the help for it. And you can also use edit(). For example: m1 - matrix(0,5,5) m2 - edit(m1) To save the object you've created, use write(), write.table(), write.matrix(), dput(), or save(). These differ in formatting and in how you read it back in. Jon -- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page:http://www.sas.upenn.edu/~baron R page: http://finzi.psych.upenn.edu/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] please help me on this problem
Yong Wang wrote: Dear all: I am totally new to R, actually, statistics software.I get two very simple, even stupid question: But you are not new to e-mails. So, please don't specify a stupid subject line, but a sensible one. (OK, the rest of this message's body is unspecific as well, hence the subject might be quite sensible in a way, tough.) 1) where I should put the data file in order to use it , I tried to build a work dir in library( package:base) and save the text file (data) there, then, I use read.table(filename), not work; I tried the full path, still not work. I must have done something wrong. The working directory is the one you are starting R in, or what you have set with setwd(). It's not a good idea to create a working directory within the library section. Specifying the full path should always work. What you did wrong is: - not reading the manual An Introduction to R carefully - not reading the manual R Data Import/Export - beeing to unspecific. After having read the manuals and help pages, you may ask a specific question, but including error messages and code you used (we cannot help if we cannot look at your mistakes). 2) is it possible to create a data file in R instead of put data in a txt file and then save the file under R? Yes. Exporting Data (including ASCII formats) is also covered in the R Data Import/Export manual. Uwe Ligges I tried to find answer from the introduction, failed. I really appreciate your help, thank you very much. best __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] please help on frag polynoms
hi there, can anyone help me on the topic of frag polynoms? i just heard of a friend of mine, that i could build in a functioon called fragpoly (he was talking of such a function in the 'stata' language) in order to improve my process of finding an optimal linear model. instead of trying a vast amount of transformed inputdata to find the best fit and then step backwards down to e.g. rank 5 in order to get a smooth curve, i could start right from the beginning with only very few but therefore very flexible funktions (litle similar to box-plot) which adopt themselve automaticaly to an optimal fitt and r-squered. can anyone tell me if such a flexible adoptive function also exists in r+? (i could not find anything on the r+ pages with these search words). waiting desperately for help joerg __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] please help on frag polynoms
I'm guessing you meant fracpoly in Stata, which is fractional polynomial smoothing. If that's the case, check out http://www.homepages.ucl.ac.uk/~ucakgam/r/. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 4:53 AM To: [EMAIL PROTECTED] Subject: [R] please help on frag polynoms hi there, can anyone help me on the topic of frag polynoms? i just heard of a friend of mine, that i could build in a functioon called fragpoly (he was talking of such a function in the 'stata' language) in order to improve my process of finding an optimal linear model. instead of trying a vast amount of transformed inputdata to find the best fit and then step backwards down to e.g. rank 5 in order to get a smooth curve, i could start right from the beginning with only very few but therefore very flexible funktions (litle similar to box-plot) which adopt themselve automaticaly to an optimal fitt and r-squered. can anyone tell me if such a flexible adoptive function also exists in r+? (i could not find anything on the r+ pages with these search words). waiting desperately for help joerg __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo /r-help -- Notice: This e-mail message, together with any attachments, ...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] please help on frag polynoms
On Thu, 10 Jul 2003 [EMAIL PROTECTED] wrote: hi there, can anyone help me on the topic of frag polynoms? I don't think there is anything currently available for fractional polynomials along the lines of -fracpoly- in Stata. You could construct an equivalent fairly easily using step(), or you could use local polynomials or splines. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help