Re: [R] R-help Digest, Vol 54, Issue 30
Ron Crump wrote: Hi, I have a dataframe that contains pedigree information; that is individual, sire and dam identities as separate columns. It also has date of birth. These identifiers are not numeric, or not sequential. Obviously, an identifier can appear in one or two columns, depending on whether it was a parent or not. These should be consistent. Not all identifiers appear in the individual column - it is possible for a parent not to have its own record if its parents were not known. Missing parental (sire and/or dam) identifiers can occur. I need to export the data for use in another program that requires the pedigree to be coded as integers, increasing with date of birth (therefore sire and dam always have lower identifiers than their offspring) and with missing values coded as 0. How would I go about doing this? You might look at http://www.qimr.edu.au/davidD/sib-pair.R, specifically the read.pedigree() and wrlink() functions. The former is not very impressive speedwise -- I usually perform these tasks in the my Sib-pair (Fortran) program, which is on the same webpage. It will order the pedigree by generational position, so a DOB is not required to do the sort. Terry Therneau's kinship package does that ordering, but doesn't include output routines for the Linkage format. David Duffy. | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v __ 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] R Help
I got the Warning message below when I tried to load Locfit. What is wrong? Regards Ola Asteman -- R version 2.4.0 (2006-10-03) Copyright (C) 2006 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. library(foreign) library(mgcv) This is mgcv 1.3-19 library(locfit) Loading required package: akima Error: package 'akima' could not be loaded In addition: Warning message: there is no package called 'akima' in: library(pkg, character.only = TRUE, logical = TRUE, lib.loc = lib.loc) -- This e-mail and any attachment may be confidential and may a...{{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] R Help
You don't have installed the akima pakage. install.packages(akima, dep=T) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 28/08/07, Ola Asteman [EMAIL PROTECTED] wrote: I got the Warning message below when I tried to load Locfit. What is wrong? Regards Ola Asteman -- R version 2.4.0 (2006-10-03) Copyright (C) 2006 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. library(foreign) library(mgcv) This is mgcv 1.3-19 library(locfit) Loading required package: akima Error: package 'akima' could not be loaded In addition: Warning message: there is no package called 'akima' in: library(pkg, character.only = TRUE, logical = TRUE, lib.loc = lib.loc) -- This e-mail and any attachment may be confidential and may a...{{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.
Re: [R] R Help
[EMAIL PROTECTED] napsal dne 28.08.2007 13:33:13: You don't have installed the akima pakage. install.packages(akima, dep=T) And wait about two months and update your R version to 2.6.0. Or update now to 2.5.1 Regards Petr -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 28/08/07, Ola Asteman [EMAIL PROTECTED] wrote: I got the Warning message below when I tried to load Locfit. What is wrong? Regards Ola Asteman -- R version 2.4.0 (2006-10-03) Copyright (C) 2006 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. library(foreign) library(mgcv) This is mgcv 1.3-19 library(locfit) Loading required package: akima Error: package 'akima' could not be loaded In addition: Warning message: there is no package called 'akima' in: library(pkg, character.only = TRUE, logical = TRUE, lib.loc = lib.loc) -- This e-mail and any attachment may be confidential and m...{{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] R help
scott flemming wrote: Hi, I wonder whether R can finish the following project: I want to make a chart to represent 10 genes. Each gene has orientation and length. Therefore, a gene can be represented by arrows. Can R be used to draw 10 arrows in one line ? Hi Scott, Maybe the feather.plot function in the plotrix package is what you want. 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] R help
Hi, I wonder whether R can finish the following project: I want to make a chart to represent 10 genes. Each gene has orientation and length. Therefore, a gene can be represented by arrows. Can R be used to draw 10 arrows in one line ? scott - [[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] R help
On 6/5/07, scott flemming [EMAIL PROTECTED] wrote: Can R be used to draw 10 arrows in one line ? Um, sure. Assuming you actually also want to know how to do it, why don't you take a look at the help for arrows(). Sarah -- Sarah Goslee http://www.functionaldiversity.org __ 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] R help
Yes, but you need to be a bit more specific... When it comes to graphs and drawing lines, there isn't much R can't do... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of scott flemming Sent: 06 June 2007 04:49 To: r-help@stat.math.ethz.ch Subject: [R] R help Hi, I wonder whether R can finish the following project: I want to make a chart to represent 10 genes. Each gene has orientation and length. Therefore, a gene can be represented by arrows. Can R be used to draw 10 arrows in one line ? scott - [[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.
Re: [R] R help
--- scott flemming [EMAIL PROTECTED] wrote: Hi, I wonder whether R can finish the following project: I want to make a chart to represent 10 genes. Each gene has orientation and length. Therefore, a gene can be represented by arrows. Can R be used to draw 10 arrows in one line ? scott Do you mean something like this? x - 1:10 y - 1:10 plot(x,y, type=n ) arrows(c(1,4,6),c(3,3,3), c(2,3, 7), c(4,4,2)) __ 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] R-help with apply and ccf
Dear R gurus, I would like to use the ccf function on two matrices that are each 196000 x 12. Ideally, I want to be able to go row by row for the two matrices using apply for the ccf function and get one 196000 X 1 array output. The apply function though wants only one array, no? Basically, is there a way to use apply when there are two arrays in order to do something like correlation on a row by row basis? Thanks for your help Michael [[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] R-help with apply and ccf
You could combine them with cbind, and then split the rows again inside the function you're calling with apply. Mat - cbind(mat1, mat2) apply(Mat, 1, function(x){ row.mat1 - x[seq_len(length(x)/2)] row.mat2 - x[length(x)/2 + seq_len(length(x)/2)] cor(row.mat1, row.mat2) }) Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 [EMAIL PROTECTED] www.inbo.be Do not put your faith in what statistics say until you have carefully considered what they do not say. ~William W. Watt A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Michael Andric Verzonden: dinsdag 22 mei 2007 17:35 Aan: r-help@stat.math.ethz.ch Onderwerp: [R] R-help with apply and ccf Dear R gurus, I would like to use the ccf function on two matrices that are each 196000 x 12. Ideally, I want to be able to go row by row for the two matrices using apply for the ccf function and get one 196000 X 1 array output. The apply function though wants only one array, no? Basically, is there a way to use apply when there are two arrays in order to do something like correlation on a row by row basis? Thanks for your help Michael [[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.
Re: [R] R-help with apply and ccf
I understand you to want correlations of corresponding rows (** not ccf, which returns a vector ccf for each pair of rows). If that is so, 1) ... in theory, diag(cor(t(A), t(B)) would work without apply, except 196,000 rows is probably too large, and it is probably too inefficient to compute and then throw away all the off-diagonals anyway. 2. ##Use a 3d array. ar - array(c(A,B),dim=c(dim(A),2)) ## this can also be done by abind() in the abind package apply(ar,1,function(x)cor(x[,1],x[,2])) ## Value is a vector 3. ## probably simplest and best sapply(seq_along(nrow(a)),function(i)cor(a[i,],b[i,])) ## Note: value is a vector, not an array Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Andric Sent: Tuesday, May 22, 2007 8:35 AM To: r-help@stat.math.ethz.ch Subject: [R] R-help with apply and ccf Dear R gurus, I would like to use the ccf function on two matrices that are each 196000 x 12. Ideally, I want to be able to go row by row for the two matrices using apply for the ccf function and get one 196000 X 1 array output. The apply function though wants only one array, no? Basically, is there a way to use apply when there are two arrays in order to do something like correlation on a row by row basis? Thanks for your help Michael [[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] R help- getting same results with different data
I am calculating batting averages using the attached code (dye.02_R_code.doc and giambi.03_R_code.doc) and the attached data. I've run this code for several players' data but always get the same results (see attached MLB R CONSOLE.doc). It's obvious that the results wouldn't be exactly the same. Any help would be greatly appreciated. *I've attached additional data in case anyone was feeling adventurous. -- Tina Robles Graduate Assistant Department of Management Science University of Miami O O S S K D O W O K K K HR O S D S K S S S O O O O S O W O O W S E W S O K K S O O HR O K O S K S O K K O O W D O O K D O O S O D O S O O O O S O O W K D K K S K W K O O O K K K O D O W O O O W O HP O K O O K S S K O K HR W O K S D O O W S O K O K W S O HR O O O O O S O W O O O S K W O W K O O O HP K W W W K S W O O O W D K S O S K O O O O K W O O K O K K K E S S K K HR D O K D HR O O O K K O K O S O O O S O O S O D S O O D O O O W D HR S O HP W S O K K O S K O O O O W O O O O O O O O K O O O K O O IW O W O W K S O O K O S K D K D O O O K O S K K K K O HP O K K O K HP S K D W S HR S S O W O O O HR S D O K HR K O D O O K W W O O O O S W K O K O O K O O O K O K O S O O O S K HR K K O O O O K S W S O K O K HR O W O O O K O K O E O K E S S K HP S W K O W HR S O O K K K O K D O O O S FC S S S O HR O O K O HR W O O O O O HR O IW W O W O O O S D O O S S K O D HR O S O O W HP O O O O W O O O HP K O S K O O K O D HP HR K K S D D K D O O S K O O K K O W O O O S K S O O O S O E T O K K O W O O O E O O W O O S O O O HR K K O O W O K HR O O S O O S W O S O W K K O O HR O W K S O O K O HR K O O W O K O O K O S W O W O O HR HR K O S O S D O O K S O O S O O S O O O HP K O O HR K O K O K S O K S K O O O W O D W D K O O W K W S O S FC K O O S O O W O K S W HR O K K K K HR HR O O K S O W HP O O D O W K W W O S O O K S HR W O O O O O O O O HR HR O W S S W HP O K O O O W O HR K K W O E O W W K W O O S K O K O W W O K HP O O S S O O W W S O W W O W O O K O O D K S O O W O O K O O K O K W O HR O K K S K O O O W O S O S K K O O O S HP K K S W K HR O O O W O K O S O O O O O O O S O K K K K O W O S O HR O W K K K S O O O S K O S K O HP S O HR O HR O K K O S O O K O K O W O S O W K D W K HP O O O O W O K O S O K IW K O K O O HR K O O S S O W O D O K W O W O O O W K W S O O W O S O D D D W K O K IW HR K S HR W O O K S K O O W HR O W O O HR IW O S W K K W HR O O W HP K O W K K HR O K D O O S K K HP O K O W W D K O O K W W HR HR W S O S W O HR O W O S D K S O W W O IW O W W K K HR O K W W S W S O W S S O O W W O HP HR O W S W D O K O W W K K S O S HR O HR W W K W O S S W O K K K O S O W O O W O W H K K K S W O S K S IW K O O W O O K O S HP W O O O D K K HR K O HR K HR W W O O K K O W K HR W HR K O O S O K O O IW O W O O K D O K HP W W O W K K K HP O W W O O HR K HP S K K S O O O W HR D D W O O W S K W HP IW O O W HR O O O K O O O D S HR O W O HR K O K D IW O S W O W K K S O O W K HP HR O O D W O S S IW O O K O O O HP W O S W W O W S K K O D K HR O W K O O O S O W O O O W W K O O W K K O D HP O O W W W O HP HP O O W O K K O W O O O O HP O O K W K O K O K K O O K HR W O K W O W O K O K O O O O K O O O E S W W S O K HP W O O S W O S S HR D K O K K K S HR W K K O W O K HR W O O O S K W K D D O O K D O K O K K S O O K K K K O W D O O W HR HR K O D K HP O W O W O O O FC HP O K O S O HR K FC O S O O W O O K S S K D O S O O K D W O S O D O O O O W O K K O O O O K W D O HR O IW K O K O K O O S K S E K O O O S W O O O W W O O O O O S K O K O O O O O K O K K S O O O K O O O S O W O O K K W O O O K O O W K O O O K O S O O HR S O W O S O O O K E W O O O O O O O O O O K O S K S K O O W O O HP O O K O O S O O O O O O K O W O O K O K O O S S O O O O O O W W O O W O O O K O O K S S HR K O K HP S O E O W O O W D K S S O O O O O O S S O K O S IW O K O O K K K O O O O S HP W W O HR O O O O O D O K O W S O K O W O S D O K O W D K O S S K O W W O K O O S D SS HP HP O K O HP K O K W W O S O K HR O E W S K K K O O K O S HR O S O O O W O O O O S K D IBB HP K S W HR K K O O W K O O S W K K K O W K W O K O HP W K W O W S O O S S K W K O K K W W K K K O O HP W W K K O O K K O K S S W K O O O W O D O K O K S S S HR O O S O O K O O O O K O S S O K O HP K S W O S K O S O W D O O O K O S O S O K S O O W O W O O O O W S W W W K D S K O K HR D HP W O O O O S W K K O O K K D O S W IW O O S O S S O K S O K W O S W S W IW K W W O K O O W O K O W S W K HR W K HR HP HR D O D HR K S K S S K O K W HR IW K HR HP O O O HP W W D S O W O K O D W O O O S K W O HR O HR W K HR HR K O K K D O O O HR O HP HP W W W HP K K K O W O O O O O K W K S W S HR HR O HR W W IW O HP O O D W K K O HR S HR W O W S O K W O W S E W S O W O O K O W O O S K O K HP W O K O O K W W W K O K O O O K W W W O O O O K K S W S K O S O O K S K O O K W O W W W O O O O W W HR HR S W HR HR K S W O W O O W S O K O S O K W O O O O HR W S HP W K S O S W O O O HR O K D K S S O S O O HR K O HR K K HR W O O S O O O O O W O O W O D W W O O W K S O K K O HP K W K S K O O O K O O W K O O O W O K HR W W W W O S HR W HP W W K S O O O
[R] r-help@stat.math.ethz.ch
doh-trying again- this time remember text only. Hello all- I am having trouble with the cell sizes that heatmap defaults too. I have a matrix of 160 rows and 5 columns that I am trying to display with heatmap(). When I do this, the cells default to really wide and very short. This makes the labels for the rows very hard to read, in fact the only way I can read them is to make the jpeg output very large and zoom in, and even then it's hard to read and the cells are so wide that you can't see the dendrogram while seeing the labels. I would like to try to have a tall, skinny heatmap with row labels big enough to read. I was able to get closer to what I want with this command... jpeg(file = view_heat.jpg,width = 4000, height = 6000) heatmap(elmat,col= brewer.pal(9,PuOr), cexCol = .8, margin = c(.01,130)) # dev.off() but it only uses a quarter of the jpeg and it is still really hard to see both the dendrogram on the left and read the labels on the right. Is there a way I can set the actual width and height of the cells so I can use the full size of the jpeg and read my labels? thanks in advance Ivan __ 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] R-help Digest, Vol 46, Issue 27
On Wednesday 27 December 2006 06:00, [EMAIL PROTECTED] wrote: jingjiangyan I agree, you can use 'assign'. To be more explicit, you could use the following function. jingjiangyan - function(formula, data) { m - match.call() %,% - function(x,y)paste(x,y,sep=) d.nm - as.character(m$data) y.nm - as.character(formula[[2]]) x.nm - as.character(formula[[3]]) for(i in levels(data[[x.nm]])){ var.name - d.nm %,% . %,% i var.val - data[[y.nm]][data[[x.nm]]==i] cmd - var.name %,% - %,% var.val eval(cmd) assign(var.name, var.val, globalenv()) } } Next, assuming the data.frame listed in the previous posting, 'df' exists in your workspace, the call jingjiangyan(bb ~ aa, data=df) would produce the desired results. Cheers, Grant Izmirlian -- Հրանդ Իզմիրլյան __ 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] R-Help
Respected Sir I am a very new user of R. I want to ask a question about the nortest package. In this package how we can write the code of ad.test, cvm.test, ks.test for other distributions like GEV, GPA etc. I request you to please guide to me. Kind Regards AMNA -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] R-Help
You might want to contact the nortest maintainer, Juergen Gross (CCing), who is not listening to the traffic on this list. Uwe Ligges amna khan wrote: Respected Sir I am a very new user of R. I want to ask a question about the nortest package. In this package how we can write the code of ad.test, cvm.test, ks.test for other distributions like GEV, GPA etc. I request you to please guide to me. Kind Regards AMNA __ 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] R-Help : Warning messages using plot(cox.zph)
Hi, I get a warning message when I plot cox.zph objects with the transform km and rank, but not with id and log with the same data set. Here's the command: example is a coxph object rk - cox.zph(example, transform='rank') rk plot(rk) and here's the warning message: Warning messages: 1: suppression des ex-aequos de 'x' in: approx(xx, xtime, seq(min(xx), max(xx), length = 17)[2 * (1:8)]) 2: suppression des ex-aequos de 'x' in: approx(xtime, xx, temp) However, no points are actually missing on my plots. Is anybody get an idea of why this happens only with km and rank transforms and what does this mean? Thank you, Kathy - Courriel expédié via https://courriel.uqtr.ca __ 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] R Help
Respected Sir I request you to please fill the following read.table function and read.csvfor my understanding by assuming my data attached with this maiL, because I am fail to run these functions using manual guidlines. read.table(file, header = FALSE, sep = , quote = \', dec = ., row.names, col.names, as.is = !stringsAsFactors, na.strings = NA, colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = #, allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors()) read.csv(file, header = TRUE, sep = ,, quote=\, dec=., fill = TRUE, comment.char=, ...) read.delim(file, header = TRUE, sep = \t, quote=\, dec=., fill = TRUE, comment.char=, ...) I shall be really thankful to you. REGARDS -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Years lrmax n1 n2 n3 n4 arranged 1980207.6 25 24 23 22 29.4 198192.724 23 22 21 49.4 198267.523 22 21 20 55.1 198393.822 21 20 19 58 198460.621 20 19 18 59 1985117.4 20 19 18 17 59.1 198665.319 18 17 16 60.6 198759.118 17 16 15 65.3 198876.917 16 15 14 67.5 1989123.1 16 15 14 13 69.6 199083.115 14 13 12 75.7 199175.714 13 12 11 76.8 199269.613 12 11 10 76.9 199355.112 11 10 9 83.1 199449.411 10 9 8 84.2 199576.810 9 8 7 87 1996189.7 9 8 7 6 88.2 1997151.1 8 7 6 5 92.7 199859 7 6 5 4 93.8 199988.26 5 4 3 110 2000110 5 4 3 2 117.4 200187 4 3 2 1 123.1 200229.43 2 1 0 136.8 200384.22 1 0 0 151.1 200458 1 0 0 0 189.7 2005136.8 0 0 0 0 207.6 __ 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] R Help
d - read.table(lahore.txt, header=TRUE) On 11/11/06, amna khan [EMAIL PROTECTED] wrote: Respected Sir I request you to please fill the following read.table function and read.csvfor my understanding by assuming my data attached with this maiL, because I am fail to run these functions using manual guidlines. read.table(file, header = FALSE, sep = , quote = \', dec = ., row.names, col.names, as.is = !stringsAsFactors, na.strings = NA, colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = #, allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors()) read.csv(file, header = TRUE, sep = ,, quote=\, dec=., fill = TRUE, comment.char=, ...) read.delim(file, header = TRUE, sep = \t, quote=\, dec=., fill = TRUE, comment.char=, ...) I shall be really thankful to you. REGARDS -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [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 and provide commented, minimal, self-contained, reproducible code. -- = David Barron Said Business School University of Oxford Park End Street Oxford OX1 1HP __ 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] R Help
data = read.delim(lahore.txt) is enough for what you want to do. b On Nov 11, 2006, at 2:11 PM, amna khan wrote: Respected Sir I request you to please fill the following read.table function and read.csvfor my understanding by assuming my data attached with this maiL, because I am fail to run these functions using manual guidlines. read.table(file, header = FALSE, sep = , quote = \', dec = ., row.names, col.names, as.is = !stringsAsFactors, na.strings = NA, colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = #, allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors()) read.csv(file, header = TRUE, sep = ,, quote=\, dec=., fill = TRUE, comment.char=, ...) read.delim(file, header = TRUE, sep = \t, quote=\, dec=., fill = TRUE, comment.char=, ...) I shall be really thankful to you. REGARDS -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] lahore.txt __ 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.
Re: [R] R Help
Not sure of what you ask... Does it help? $ read.table(Desktop/lahore.txt, header=T) Years lrmax n1 n2 n3 n4 arranged 1 1980 207.6 25 24 23 22 29.4 2 1981 92.7 24 23 22 21 49.4 3 1982 67.5 23 22 21 20 55.1 4 1983 93.8 22 21 20 19 58.0 5 1984 60.6 21 20 19 18 59.0 6 1985 117.4 20 19 18 17 59.1 7 1986 65.3 19 18 17 16 60.6 8 1987 59.1 18 17 16 15 65.3 9 1988 76.9 17 16 15 14 67.5 10 1989 123.1 16 15 14 13 69.6 11 1990 83.1 15 14 13 12 75.7 12 1991 75.7 14 13 12 11 76.8 13 1992 69.6 13 12 11 10 76.9 14 1993 55.1 12 11 10 9 83.1 15 1994 49.4 11 10 9 8 84.2 16 1995 76.8 10 9 8 7 87.0 17 1996 189.7 9 8 7 6 88.2 18 1997 151.1 8 7 6 5 92.7 19 1998 59.0 7 6 5 4 93.8 20 1999 88.2 6 5 4 3110.0 21 2000 110.0 5 4 3 2117.4 22 2001 87.0 4 3 2 1123.1 23 2002 29.4 3 2 1 0136.8 24 2003 84.2 2 1 0 0151.1 25 2004 58.0 1 0 0 0189.7 26 2005 136.8 0 0 0 0207.6 Le Samedi 11 Novembre 2006 20:11, amna khan a écrit : Respected Sir I request you to please fill the following read.table function and read.csvfor my understanding by assuming my data attached with this maiL, because I am fail to run these functions using manual guidlines. read.table(file, header = FALSE, sep = , quote = \', dec = ., row.names, col.names, as.is = !stringsAsFactors, na.strings = NA, colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = #, allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors()) read.csv(file, header = TRUE, sep = ,, quote=\, dec=., fill = TRUE, comment.char=, ...) read.delim(file, header = TRUE, sep = \t, quote=\, dec=., fill = TRUE, comment.char=, ...) I shall be really thankful to you. REGARDS -- Nicolas Mazziotta __ 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] R Help
If you were trying to use the sep=\t argument, you might have encountered an error, as there are three tabs one of the two blank lines at the end of your data file. The default for read.table and read.delim (as has been suggested by David and Benilton) is whitespace, which consumes the unintended tabs w/o problem. Jeff. On Nov 11, 2006, at 2:31 PM, Benilton Carvalho wrote: data = read.delim(lahore.txt) is enough for what you want to do. b On Nov 11, 2006, at 2:11 PM, amna khan wrote: Respected Sir I request you to please fill the following read.table function and read.csvfor my understanding by assuming my data attached with this maiL, because I am fail to run these functions using manual guidlines. read.table(file, header = FALSE, sep = , quote = \', dec = ., row.names, col.names, as.is = !stringsAsFactors, na.strings = NA, colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = #, allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors()) read.csv(file, header = TRUE, sep = ,, quote=\, dec=., fill = TRUE, comment.char=, ...) read.delim(file, header = TRUE, sep = \t, quote=\, dec=., fill = TRUE, comment.char=, ...) I shall be really thankful to you. REGARDS -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] lahore.txt __ 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-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] R Help
Respected Sir I am very new user of R language. Sir i am facing problems in learning R language reading manuals. Sir is there any possibility of learning it by some tutor online? Sir my research work is going to be late because of not having understanding of R. After a long struggle, I am just able to import data. But i am unable to save it as a data file. Sir I request you to please give me some instructions. And how I can make it easier for learning it. I shall be very thank ful to you for your help. Regards -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] R-help in Newsreader?
Matthias Voigt [EMAIL PROTECTED] writes: Dear list, I am new to this all and therefore have following Newbie question: How can I receive and read R-help mailings in a newsreader like thunderbird? Use gmane.comp.lang.r.general on gmane.org HTH, Jens __ 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] R help
*I am a very new user of R. I've spent several hours trying to import data, I am successful in importing data from Excel. After having the data on R console, I am not understanding how to make a file for imported data,so I feel okay asking the list for help. * *I have used save workspace option from file menu. but when i have to use that saved workspace in extReme toolkit using read data option from file menu I am getting the following messages* ** *Error in read.table(C:/Program Files/R/R-2.4.0/Rainfall Data/lahore, : more columns than column names In addition: Warning message: incomplete final line found by readTableHeader on 'C:/Program Files/R/R- 2.4.0/Rainfall Data/lahore' Error in parse(file, n = -1, NULL, ?) : syntax error* ** *I request you to please guide to me.* *Regards *AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [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 and provide commented, minimal, self-contained, reproducible code.
[R] R-help in Newsreader?
Dear list, I am new to this all and therefore have following Newbie question: How can I receive and read R-help mailings in a newsreader like thunderbird? Thanks Matthias _ __ 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] R-help in Newsreader?
On Fri, 2006-11-03 at 17:36 +0100, Matthias Voigt wrote: Dear list, I am new to this all and therefore have following Newbie question: How can I receive and read R-help mailings in a newsreader like thunderbird? Thanks Matthias If you go to the main R web site (http://www.r-project.org/) and click on the Mailing Lists link, then scroll down to Archives and Search Facilities, the second bullet indicates that the lists are available via Gmane, which mirrors the R lists (and many others) to an NNTP server. HTH, Marc Schwartz __ 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] R-help in a newsgroup
Hi, I find a lot of the R-help email traffic overloads my inbox. My IT managers are not really happy for me to be subscribed to several high-traffic email lists. I don't want to lose my contact with the R-help emails, so I'm having to consider various ways of handling the traffic. Anyhow, I'm wondering how many people on the R-help email list would prefer that most of the traffic were in a newsgroup? In case your interested in that option, there is a group available at: [EMAIL PROTECTED] I think the subscription is through normal news group channels. The google search services on this group are nice too. This group is not divided into useful categories, like help, admin, develop etc., but it's not too difficult to create new groups for that. Best, Darren __ 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] R-help in a newsgroup
On Tue, 2006-07-18 at 11:30 -0700, Darren Weber wrote: Hi, I find a lot of the R-help email traffic overloads my inbox. My IT managers are not really happy for me to be subscribed to several high-traffic email lists. I don't want to lose my contact with the R-help emails, so I'm having to consider various ways of handling the traffic. Anyhow, I'm wondering how many people on the R-help email list would prefer that most of the traffic were in a newsgroup? In case your interested in that option, there is a group available at: [EMAIL PROTECTED] I think the subscription is through normal news group channels. The google search services on this group are nice too. This group is not divided into useful categories, like help, admin, develop etc., but it's not too difficult to create new groups for that. Best, Darren r-help is already available with an NNTP interface at gmane.org: http://dir.gmane.org/gmane.comp.lang.r.general There is also a web based interface, where you can see that your post is already available: http://news.gmane.org/gmane.comp.lang.r.general Similarly, r-devel is also present: http://dir.gmane.org/gmane.comp.lang.r.devel The Google group you reference is completely independent of the R e-mail lists, whereas the gmane interface is synchronized with the R e-mail lists. HTH, Marc Schwartz __ 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] R-help in a newsgroup
On 7/18/2006 2:30 PM, Darren Weber wrote: Hi, I find a lot of the R-help email traffic overloads my inbox. My IT managers are not really happy for me to be subscribed to several high-traffic email lists. I don't want to lose my contact with the R-help emails, so I'm having to consider various ways of handling the traffic. Anyhow, I'm wondering how many people on the R-help email list would prefer that most of the traffic were in a newsgroup? In case your interested in that option, there is a group available at: [EMAIL PROTECTED] I think the subscription is through normal news group channels. The google search services on this group are nice too. This group is not divided into useful categories, like help, admin, develop etc., but it's not too difficult to create new groups for that. If you prefer the newsgroup interface, you should also look at gmane. Gabor G posted a list of the newsgroups here: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/75239.html recently. Duncan Murdoch Best, Darren __ 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] r-help@stat.math.ethz.ch
Dear All: I tried to fit negative binomial distribution to data in terms of mean and mean is also a quadratic function of another variable. The likelihood function is: function (parameters, y1,x11) { p-parameters[1] alpha1-parameters[1] beta1-parameters[2] delta1-parameters[3] mu-alpha1+beta1*(x11)+delta1*(x11^2) ifelse(y1=0|x11=0, L- lgamma(y1+p)+p*(log(p)-log(mu+p))+y1*(log(mu)-log(mu+p)) -lfactorial(y1)-lgamma(p) ,Inf) L } I got outputs even it sounds a problem for delata. Actually, there is a mistake made for the parameters (p alpha1) set up. If I correct them as: p-parameters[1] alpha1-parameters[2] beta1-parameters[3] delta1-parameters[4] Then error messga there: initial value in 'vmmin' is not finite In addition: There were 38 warnings (use warnings() to see them). Could you give some advice please? Thanks a lot! Xin Shi [[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] r-help at stat.math.ethz.ch
Xin jasonshi510 at hotmail.com writes: Dear All: Then error messga there: initial value in 'vmmin' is not finite In addition: There were 38 warnings (use warnings() to see them). Could you give some advice please? Thanks a lot! Xin Shi [[alternative HTML version deleted]] __ R-help at 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 A little more information (and an informative Subject: line) would help. A reproducible example (let us know how you're calling optim(), and ideally show your data or a subsample of it that produces the same problem --- see the posting guide). A few ideas: - the 'vmmin' error message says that your starting values are giving non-finite results -- this could be because some of your x and y values are negative (which in your could would lead to infinite values). Bottom line: try your objective function with your starting parameter values and see what happens - you could use dnbinom(...,log=TRUE) if you wanted - you may need to be careful with constraining alpha, beta, delta, as you could end up with negative means. __ 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] R-help Digest, Vol 39, Issue 13
r-help@stat.math.ethz.ch on Saturday, May 13, 2006 at 6:00 AM -0500 wrote: lme(biomass~age, random=~woods/age)? Jörn Consult Pinheiro and Bates (2000, Mixed-effects models in S and S-Plus, Springer, ISBN 0-387-98957-0 ref 7 at http://www.r-project.org/doc/bib/R-books.html ) for how to fit more elaborate models, but two straightforward ones that might be adequate are lme( biomass~age, random=~1|woods ) and lme( biomass~age, random=~age|woods ) In the lme4 library corresponding syntax is lmer( biomass~age+(1|woods) ) and lmer( biomass~age+(age|woods) ) For vignettes on the lme4 library see the mlmRev library and @ARTICLE{Rnews:Bates:2005, AUTHOR = {Douglas Bates}, TITLE = {Fitting Linear Mixed Models in {R}}, JOURNAL = {R News}, YEAR = 2005, VOLUME = 5, NUMBER = 1, PAGES = {27--30}, MONTH = {May}, URL = {[ http://CRAN.R-project.org/doc/Rnews/ ]http://CRAN.R-project.org/doc/Rnews/} } alan -- Alan B. Cobo-Lewis, Ph.D. (207) 581-3840 tel Department of Psychology(207) 581-6128 fax University of Maine Orono, ME 04469-5742[EMAIL PROTECTED] http://www.umaine.edu/visualperception __ 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] R-help Digest, Vol 38, Issue 30
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [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] R help
Hello, I'm working with large matrix data and i would like to know if there is any way to reduce the size of it because even that I'm increasing the memory limit and that i have 1 gb memory the program throwing me out. There is any way to use a smaller size data (such as using bits or so) to reduce the size of it. Erez __ 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] R help
Ezra I don't know what the elements of your matrix are, but if there are a large proportion of 0s you can work with sparse matrices in the Matrix package. Harold -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Erez Sent: Tuesday, April 25, 2006 8:39 AM To: r-help@stat.math.ethz.ch Subject: [R] R help Hello, I'm working with large matrix data and i would like to know if there is any way to reduce the size of it because even that I'm increasing the memory limit and that i have 1 gb memory the program throwing me out. There is any way to use a smaller size data (such as using bits or so) to reduce the size of it. Erez __ 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] R help
A similar question was just asked. See: http://tolstoy.newcastle.edu.au/R/help/06/04/25898.html On 4/25/06, Erez [EMAIL PROTECTED] wrote: Hello, I'm working with large matrix data and i would like to know if there is any way to reduce the size of it because even that I'm increasing the memory limit and that i have 1 gb memory the program throwing me out. There is any way to use a smaller size data (such as using bits or so) to reduce the size of it. Erez __ 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] R help
Hello, I'm trying to create a large matrix and it's extends the limit boundaries. The matrix is 100,000x2874 and R is throwing me out, what shall i do? Thanks Erez __ 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] R help
Hi more memory new comp new OS think about possibility to reformulate the problem with help of database and loading/processing data in chunks. Couple of similar questions were answered not long ago so check archives. HTH Petr On 24 Apr 2006 at 13:06, Erez wrote: Date sent: Mon, 24 Apr 2006 13:06:12 +0200 From: Erez [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject:[R] R help Hello, I'm trying to create a large matrix and it's extends the limit boundaries. The matrix is 100,000x2874 and R is throwing me out, what shall i do? Thanks Erez __ 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 Petr Pikal [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] R help
Hi, There is anyway to run R script on c++? Erez __ 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] R-Help
Dear r-users, Suppose I have three datasets: Dataset-1: Date x y Jan-1,2005120 230 Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-7,200511299 Mar-5,2005200 311 Dataset-2: Date x y Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Jan-6,2005-23 12 Mar-5,2005200 311 Dataset-3: Date x y Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Mar-5,2005200 311 Apl-23,2005 123 200 Now I want to get the common dates along with x and y from this above three datasets keeping the same order in date-variable as it is. For ex. I want to get: Datex y xy x y (from dataset-1) (from dataset-2) (from dataset-3) Jan-3,2005-110 300 -110 300 -110 300 Jan-4,2005 114 -21 114-21 114 -21 Mar-5,2005200 311 200 311 200 311 Can anyone give me any R code to implement this for any number of datasets ? Thanks and regards 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] R-Help
Read them in as zoo objects (you can replace textConnection(Lines1) with the filename) and then merge them using all = FALSE to retain only common time points. Note that in my English locale I had to modify your Apl to Apr. Lines1 - Date x y Jan-1,2005120 230 Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-7,200511299 Mar-5,2005200 311 Lines2 - Date x y Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Jan-6,2005-23 12 Mar-5,2005200 311 Lines3 - Date x y Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Mar-5,2005200 311 Apr-23,2005 123 200 library(zoo) DF1 - read.zoo(textConnection(Lines1), header = TRUE, format = %b-%d,%Y) DF2 - read.zoo(textConnection(Lines2), header = TRUE, format = %b-%d,%Y) DF3 - read.zoo(textConnection(Lines3), header = TRUE, format = %b-%d,%Y) merge(DF1, DF2, DF3, all = FALSE) On 4/20/06, stat stat [EMAIL PROTECTED] wrote: Dear r-users, Suppose I have three datasets: Dataset-1: Date x y Jan-1,2005120 230 Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-7,200511299 Mar-5,2005200 311 Dataset-2: Date x y Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Jan-6,2005-23 12 Mar-5,2005200 311 Dataset-3: Date x y Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Mar-5,2005200 311 Apl-23,2005 123 200 Now I want to get the common dates along with x and y from this above three datasets keeping the same order in date-variable as it is. For ex. I want to get: Datex y xy x y (from dataset-1) (from dataset-2) (from dataset-3) Jan-3,2005-110 300 -110 300 -110 300 Jan-4,2005 114 -21 114-21 114 -21 Mar-5,2005200 311 200 311 200 311 Can anyone give me any R code to implement this for any number of datasets ? Thanks and regards 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] R-Help
I think this does what you require. #Read your data in whatever way you wish: d1-data.frame(Date=c(2005/1/1,2005/2/1,2005/1/3,2005/1/4,2005/ 1/7,2005/3/5), x=c(119,123,-110,114,11,200), y=c(230,-125,300,-21,299,311)) d2-data.frame(Date=c(2005/1/3,2005/1/4,2005/1/5,2005/1/6,2005/ 3/5), x=c(-220,116,888,-239,201), y=c(301,-23,3000,122,312)) d3-data.frame(Date=c(2005/1/4,2005/1/5,2005/3/5,2005/4/23), x=c(392,511,600,723), y=c(-81,6699,9311,1200)) #Make a list listof-list(d1,d2,d3) #loop over any number of datasets merging as you go for ( dataset in 1:length(listof)-1) { if (dataset == 1) { res-merge(listof[dataset],listof[dataset+1],all=T,by=Date) } else { res-merge(res,listof[dataset+1],all=T,by=Date) } } # Hope that helps JS --- John Seers Institute of Food Research Norwich Research Park Colney Norwich NR4 7UA tel +44 (0)1603 251490 fax +44 (0)1603 255167 e-mail [EMAIL PROTECTED] e-disclaimer at http://www.ifr.ac.uk/edisclaimer/ Web sites: www.ifr.ac.uk www.foodandhealthnetwork.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of stat stat Sent: 20 April 2006 09:17 To: r-help@stat.math.ethz.ch Subject: [R] R-Help Dear r-users, Suppose I have three datasets: Dataset-1: Date x y Jan-1,2005120 230 Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-7,200511299 Mar-5,2005200 311 Dataset-2: Date x y Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Jan-6,2005-23 12 Mar-5,2005200 311 Dataset-3: Date x y Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-5,200511299 Mar-5,2005200 311 Apl-23,2005 123 200 Now I want to get the common dates along with x and y from this above three datasets keeping the same order in date-variable as it is. For ex. I want to get: Datex y xy x y (from dataset-1) (from dataset-2) (from dataset-3) Jan-3,2005-110 300 -110 300 -110 300 Jan-4,2005 114 -21 114-21 114 -21 Mar-5,2005200 311 200 311 200 311 Can anyone give me any R code to implement this for any number of datasets ? Thanks and regards 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] R-help Digest, Vol 38, Issue 19
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [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] R-help Digest, Vol 38, Issue 9
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [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] R-Help List
Sumanta Basak. Analyst - Quantitative Services Direct Line: +91.80.4151 5842 Mobile : (080) 9886282470 Fax: +91.80.4151 5809 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Amba Research India Pvt. Ltd. Second Floor, Block A. Diamond District. # 150, Airport Road. Bangalore - 560008, India. www.ambaresearch.com http://www.ambaresearch.com --- THIS COMMUNICATION DOES NOT CONSTITUTE INVESTMENT ADVICE OR COUNSEL OR SOLICITATION FOR INVESTMENT IN ANY SECURITY. This e-mail may contain confidential and/or privileged infor...{{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
Re: [R] R-help Digest, Vol 37, Issue 26
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [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] R-help Digest, Vol 37, Issue 15
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [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] R-help Digest, Vol 37, Issue 12
Hi r-users, I would like to know if R have any solution to the Address standardization. The problem is to classify a database of addresses with the real addresses of a streets of Spain. Ideally, I would like to assign Postal code, census data and other geographic information. If this is not possible I would like to know solutions in R about text mining, text classification, distance within text data,... Any help will be appreciate Thanks in advance Ferran Carrascosa __ 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] R-help Digest, Vol 37, Issue 12
From: Ferran Carrascosa Hi r-users, I would like to know if R have any solution to the Address standardization. The problem is to classify a database of addresses with the real addresses of a streets of Spain. Ideally, I would like to assign Postal code, census data and other geographic information. I have no idea about this one... If this is not possible I would like to know solutions in R about text mining, text classification, distance within text data,... RSiteSearch(text mining) produced hits that look relevant. Andy Any help will be appreciate Thanks in advance Ferran Carrascosa __ 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] R-help list: temporary problem in local archives
Dimitri == Dimitri Szerman [EMAIL PROTECTED] on Mon, 6 Mar 2006 14:17:33 -0300 writes: Dimitri Hi, Dimitri It seems the list faced some problems during the Dimitri weekend, so I am re-sending this message. To be specific: The only problems it saw was that the local *archiving* had stopped working from ~ Friday 17:30 MET. The archiver now works again (and I have spent about an hour to ensure that everything shows up in the archives as it should). Dimitri's message actually *did* appear well on the list (yesterday). Martin Maechler, ETH Zurich your mailing list manager __ 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] R-help list: temporary problem in local archives
Martin == Martin Maechler [EMAIL PROTECTED] on Mon, 6 Mar 2006 18:37:06 +0100 writes: Dimitri == Dimitri Szerman [EMAIL PROTECTED] on Mon, 6 Mar 2006 14:17:33 -0300 writes: Dimitri Hi, Dimitri It seems the list faced some problems during the Dimitri weekend, so I am re-sending this message. Martin To be specific: The only problems it saw was that the local *archiving* Martin had stopped working from ~ Friday 17:30 MET. Martin The archiver now works again (and I have spent about an hour to Martin ensure that everything shows up in the archives as it should). well, unfortunately, I have managed to wipeout the index.html file of the full archive there. AARgh! [the archives, its HTML pages, everything is still there, but all the older parts are currently not *linked* to] Recreating everything from scratch (1997) would need so many hours --- where mailman delivery to r-help was completely blocked --- that I'm considering other plans to get that file back (and only recreate the March 2006 part). All this mess just because of a spam that I wanted to have removed, something which needs careful manual intervention; I have failed in my care at one place. Martin Martin Dimitri's message actually *did* appear well on the list Martin (yesterday). Martin Martin Maechler, ETH Zurich Martin your mailing list manager __ 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] R-help Digest, Vol 37, Issue 1
Mi nueva dirección de correo es: [EMAIL PROTECTED] New e-mail address: [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] R-help Digest, Vol 36, Issue 21
Hello, dear R users. I've already sent a question here, but I'm not sure that it had been read. I need to visualize classification of my numerical data based on 2-3 factors. As I suppose, the best way is a tree. With an orbitrary function at the ends (leaves), or at least with means of my data at the ends. What is the way to do it? As I found, ctree offers binary classification, but it that the only way? Of course, tree is not only way, may be you could offer other ways. Thank you. __ 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] R-help Digest, Vol 36, Issue 21
Evgeniy Kachalin wrote: Hello, dear R users. I've already sent a question here, but I'm not sure that it had been read. I need to visualize classification of my numerical data based on 2-3 factors. As I suppose, the best way is a tree. With an orbitrary function at the ends (leaves), or at least with means of my data at the ends. What is the way to do it? As I found, ctree offers binary classification, but it that the only way? Of course, tree is not only way, may be you could offer other ways. Or the best way of it is to do it with replacement, like a 'heatmap', but with means in the cells instead of colors, if it is possible. Sorry for the second letter. __ 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] R-help, specifying the places to decimal
Hello - R-experts, Is there any way with which we can specify the number after decimal point to take. Like I have a situation where the values are comming 0.160325923 but I only want 4 place to decimal say 0.1603. Is there any way for that. I am no expert in R- and this may sound simple to many.sorry Thanks for any help. With Regards Subhabrata __ 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] R-help, specifying the places to decimal
have a look at ?round() Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://www.med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Subhabrata [EMAIL PROTECTED] To: r-help r-help@stat.math.ethz.ch Sent: Monday, February 13, 2006 9:33 AM Subject: [R] R-help, specifying the places to decimal Hello - R-experts, Is there any way with which we can specify the number after decimal point to take. Like I have a situation where the values are comming 0.160325923 but I only want 4 place to decimal say 0.1603. Is there any way for that. I am no expert in R- and this may sound simple to many.sorry Thanks for any help. With Regards Subhabrata __ 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 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm __ 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] R-help, specifying the places to decimal
In addition to round() mentioned earlier, if you are merely looking to *display* your results differently, you may want to check out the digits option, e.g. in summary(): (This is the method signature for data.frame 's): summary(object, maxsum = 7, digits = max(3, getOption(digits)-3), ...) (Begin quoted message) Date: Mon, 13 Feb 2006 14:03:55 +0530 From: Subhabrata [EMAIL PROTECTED] Subject: [R] R-help, specifying the places to decimal To: r-help r-help@stat.math.ethz.ch Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-1 Hello - R-experts, Is there any way with which we can specify the number after decimal point to take. Like I have a situation where the values are comming 0.160325923 but I only want 4 place to decimal say 0.1603. Is there any way for that. I am no expert in R- and this may sound simple to many.sorry Thanks for any help. With Regards Subhabrata -- -- Vivek Satsangi Student, Rochester, NY USA __ 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] R-help Digest, Vol 35, Issue 24
I've been reluctant to step into this topic, but now feel that it may be helpful to make a certain point. On the internet, for the most part, the person behind the email is invisible and intangible. It is therefore possible, when someone puts their foot down, to stamp inadvertently on someone else's already broken toes. A friend of mine, very intelligent, very knowledgeable and creative, very articulate, nevertheless when writing uses spelling which can be a close approximation to random, and some interesting variants of grammar and vocabulary as well. The reason: dyslexia. While most of us hit the wrong keys at times (and when we read back over what we've written tend to see what we intended to write rather than what we did write), and when backed against the wall would admit that we could have got it right if we had paid better attention, there are some people who can't help getting it wrong. But, on the internet, one cannot readily recognise who they are (though in some cases, if one knows the signs, one may guess). Best wishes to all, Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 25-Jan-06 Time: 10:06:35 -- 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] R-help Digest, Vol 35, Issue 24
[Gabor Grothendieck] [...] this list is inhabited by some rather rude participants but everyone puts up with them in the hope that they do have some useful remarks. I've been witnessing this list for about one year, and also read *lots* of archived messages. While it is true that a few members do not use white gloves, are rather fond on concise replies, and do express strong opinions at times, they never went overboard insulting people and always kept a reasonable measure, at least so far that I could see (yet who knows, outliers might happen! :-). (*) Our whole society is a bit shy and shivers easily when opinions are expressed nowadays, I often observed than people quickly get insecure, feel attacked, and overreact (by running away or starting a fight). there is even a group of thought that feels it is a justifiable way to keep the list volume under control. This may work because of the starred paragraph above, that is, for wrong reasons. Best is, and this often occurs on the R list, when everything (facts, opinions) is being shared efficiently, without useless arguing. Then, threads quickly fade out. -- François Pinard http://pinard.progiciels-bpi.ca __ 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] R-help Digest, Vol 35, Issue 24
Dear Prof Ripley, First of all, unless you are an english professor, then I do not think you have any business policing language. I'm still very much a student, both in R, and regarding signal analysis. My competence on the subject as compared too your own level of expertise, or my spelling for that matter, may be a contension for you, but it would have been better had you kept that opinion too yourself. There are plenty of other reasons besides laziness or carelessness that people will consistently error in language use, such as learning disorders, head injuries, and/or vertigo. On the contrary, I am aware of the definition of a periodogram, and I know what the unnormalized periodogram in the data I presented looks like. Spec.pgram() is actually normalized too something, because it's discrete integral is not well above the SS amplitude of the signal it computed the periodogram for. In other words, the powers are not in units of around 4,000, which the peak would be if the units were merely the modulus squared of the Fourier coeficients of the data I presented. Alas, the modulus squared of the Fourier coeficients IS the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist critical frequency. The definition of the ONE SIDED periodogram IS the modulus squared of the Fourier coeficients ranging over [0, fc], but since the function is even, data points in (0, fc) non-inclusive, need to be multiplied by 2. Thus is according too the definition given by Press, et al (1988, 1992, 2002, c.f. cp 12 13). I'm assuming that R returns an FFT in the same layout as Press, et al describe. Press, et al. are also very clear about the existence of far too many ways of normalizing the periodogram too document, which they stated before delving into particularly how they normalized to the mean squared amplitude of the signal that the periodogram was computed from. In the page before, and perhaps this is where some of the confusion arises from, they document the calculations for MS and SS amplitudes and time integral squared amplitude of the signal in the time domain, not the frequency domain. The page after that, their example only shows how to normalize a periodogram so its sum is equal too the MS amplitude. In short, but starting from SS amplitude: a). sum(a[index=(1:N) or t=(0:N-1)]^2) = SS amplitude calculated in time domain b). 1/N * sum(Mod(fft[-fc:fc])^2) = two sided periodogram that sums too the SS amplitude c). Same as b but over the range [0, fc], and (0, fc) multiplied by 2 is the one sided periodogram, also sums too the SS amplitude For MS amplitude, the procedures are identical, only the time domain is divided by N, and the frequency domain figures are divided by N^2 instead of N. When the periodogram is in power per unit time, as in the above, so that the power is interpretable at N/2+1 independent frequencies, it is a normalized periodogram. spec.pgram() IS normalized, I just do not know what it's normalized too because I can not seem to get spec.pgram to stop tapering (at which point the normalization should be dead on, not just close). By the way, normalized does not automatically mean anything unless to what is stated. I could normalize something arbitrarily to the number of tics on my dogs back side, and still call it normed, or erroneously refer too it as unnormed. If normalized is suposed to mean something specific, then I am confident that more than 90% of undergraduates are not familiar with what the term should mean. Stats and coding and using programs are a human endeavor. This human seems to have made meaning out of terms differently than what those who wrote the documentation seem to have intended. Only, I do not know where the documentation or my understanding may have been missled (R docs, Numerical Recipes, or any other source I looked at since I started). Cheers, KeithC. First, please look up `too' in your dictionary. Second, please study the references on the help page, which give the details. That is what references are for! The references will also answer your question about the reference distribution. The help page does not say it is `normalized' at all: it says it computes the peridogram, and you seem unaware of the definitions of the latter (and beware, there are more than one). On Tue, 24 Jan 2006, Keith Chamberlain wrote: __ 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] R-help Digest, Vol 35, Issue 24
Dear Mr. Chamberlain: You asked for free consulting, and as near as I can tell, you got pretty good advice. Now you complain that you don't like the packaging. If you can't stand the heat, get out of the kitchen. Professor Brian Ripley has an international reputation based on solid contributions to human knowledge over many years. He is an expert in statistical science, not diplomacy. Professor Ripley has been incredibly generous in donating substantial portions of his time for many years both to help make R what it is today and to answering questions on this listserve. I think he deserves a great deal of respect for not only the time he has devoted to this but to how much he has achieved with that time. What would you like him to do as a result of your email? Retire? Stop contributing to this listserve and to the R project more generally? I sincerely hope he does not consider such. It would be a great loss to humanity if he did. Mr. Chamberlain, if English (or as Prof. Ripley might say, American) is your mother tongue, then your deplorable lack of skill in its use raises serious questions about the standard of academic excellence at the University of Colorado, which I had previously thought was a great university and the finest Colorado had to offer. Of course, if English is a second language for you, then I would not complain. Rather, I would be humbled and honored that you chose to meet the rest of the world in my native tongue. Another question: The web lists you as a senior in psychology. Have you learned anything in your study of psychology? I would think that psychology students should meet a much higher standard for social skills and communications than you have displayed today. Would you like me to forward your correspondence to, say, the editor of the Flatiron News there in Boulder or Prof. W. Edward Craighead, the chair of the Psychology Dept., asking if a degree from the once-great University of Colorado is supposed to imply that the degree holder meets any standard for academic excellence in comportment and the use of language? Sincerely, Spencer Graves [EMAIL PROTECTED] wrote: Dear Prof Ripley, First of all, unless you are an english professor, then I do not think you have any business policing language. I'm still very much a student, both in R, and regarding signal analysis. My competence on the subject as compared too your own level of expertise, or my spelling for that matter, may be a contension for you, but it would have been better had you kept that opinion too yourself. There are plenty of other reasons besides laziness or carelessness that people will consistently error in language use, such as learning disorders, head injuries, and/or vertigo. On the contrary, I am aware of the definition of a periodogram, and I know what the unnormalized periodogram in the data I presented looks like. Spec.pgram() is actually normalized too something, because it's discrete integral is not well above the SS amplitude of the signal it computed the periodogram for. In other words, the powers are not in units of around 4,000, which the peak would be if the units were merely the modulus squared of the Fourier coeficients of the data I presented. Alas, the modulus squared of the Fourier coeficients IS the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist critical frequency. The definition of the ONE SIDED periodogram IS the modulus squared of the Fourier coeficients ranging over [0, fc], but since the function is even, data points in (0, fc) non-inclusive, need to be multiplied by 2. Thus is according too the definition given by Press, et al (1988, 1992, 2002, c.f. cp 12 13). I'm assuming that R returns an FFT in the same layout as Press, et al describe. Press, et al. are also very clear about the existence of far too many ways of normalizing the periodogram too document, which they stated before delving into particularly how they normalized to the mean squared amplitude of the signal that the periodogram was computed from. In the page before, and perhaps this is where some of the confusion arises from, they document the calculations for MS and SS amplitudes and time integral squared amplitude of the signal in the time domain, not the frequency domain. The page after that, their example only shows how to normalize a periodogram so its sum is equal too the MS amplitude. In short, but starting from SS amplitude: a). sum(a[index=(1:N) or t=(0:N-1)]^2) = SS amplitude calculated in time domain b). 1/N * sum(Mod(fft[-fc:fc])^2) = two sided periodogram that sums too the SS amplitude c). Same as b but over the range [0, fc], and (0, fc) multiplied by 2 is the one sided periodogram, also sums too the SS amplitude For MS amplitude, the procedures are identical, only the time domain is divided by N, and
Re: [R] R-help Digest, Vol 35, Issue 24
[EMAIL PROTECTED], addressing to Brian Ripley] First of all, unless you are an english professor, then I do not think you have any business policing language. We all do mistakes (English or otherwise). I'm very grateful that people forgive my own errors, and I try to be tolerant to others. (Yet, it happens that people lacking good will ask for stronger reactions.) This is the business of everybody, really, building a better community in every possible aspect, and the means for this go through interaction and collaboration. Let's all be humble enough to ponder the criticism of others, improve ourselves, and so increase the value of our share. -- François Pinard http://pinard.progiciels-bpi.ca __ 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] R-help Digest, Vol 35, Issue 24
Its not really you. Its a fact of life that this list is inhabited by some rather rude participants but everyone puts up with them in the hope that they do have some useful remarks. This has been discussed repeatedly on the list and there is even a group of thought that feels it is a justifiable way to keep the list volume under control. On 1/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear Prof Ripley, First of all, unless you are an english professor, then I do not think you have any business policing language. I'm still very much a student, both in R, and regarding signal analysis. My competence on the subject as compared too your own level of expertise, or my spelling for that matter, may be a contension for you, but it would have been better had you kept that opinion too yourself. There are plenty of other reasons besides laziness or carelessness that people will consistently error in language use, such as learning disorders, head injuries, and/or vertigo. On the contrary, I am aware of the definition of a periodogram, and I know what the unnormalized periodogram in the data I presented looks like. Spec.pgram() is actually normalized too something, because it's discrete integral is not well above the SS amplitude of the signal it computed the periodogram for. In other words, the powers are not in units of around 4,000, which the peak would be if the units were merely the modulus squared of the Fourier coeficients of the data I presented. Alas, the modulus squared of the Fourier coeficients IS the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist critical frequency. The definition of the ONE SIDED periodogram IS the modulus squared of the Fourier coeficients ranging over [0, fc], but since the function is even, data points in (0, fc) non-inclusive, need to be multiplied by 2. Thus is according too the definition given by Press, et al (1988, 1992, 2002, c.f. cp 12 13). I'm assuming that R returns an FFT in the same layout as Press, et al describe. Press, et al. are also very clear about the existence of far too many ways of normalizing the periodogram too document, which they stated before delving into particularly how they normalized to the mean squared amplitude of the signal that the periodogram was computed from. In the page before, and perhaps this is where some of the confusion arises from, they document the calculations for MS and SS amplitudes and time integral squared amplitude of the signal in the time domain, not the frequency domain. The page after that, their example only shows how to normalize a periodogram so its sum is equal too the MS amplitude. In short, but starting from SS amplitude: a). sum(a[index=(1:N) or t=(0:N-1)]^2) = SS amplitude calculated in time domain b). 1/N * sum(Mod(fft[-fc:fc])^2) = two sided periodogram that sums too the SS amplitude c). Same as b but over the range [0, fc], and (0, fc) multiplied by 2 is the one sided periodogram, also sums too the SS amplitude For MS amplitude, the procedures are identical, only the time domain is divided by N, and the frequency domain figures are divided by N^2 instead of N. When the periodogram is in power per unit time, as in the above, so that the power is interpretable at N/2+1 independent frequencies, it is a normalized periodogram. spec.pgram() IS normalized, I just do not know what it's normalized too because I can not seem to get spec.pgram to stop tapering (at which point the normalization should be dead on, not just close). By the way, normalized does not automatically mean anything unless to what is stated. I could normalize something arbitrarily to the number of tics on my dogs back side, and still call it normed, or erroneously refer too it as unnormed. If normalized is suposed to mean something specific, then I am confident that more than 90% of undergraduates are not familiar with what the term should mean. Stats and coding and using programs are a human endeavor. This human seems to have made meaning out of terms differently than what those who wrote the documentation seem to have intended. Only, I do not know where the documentation or my understanding may have been missled (R docs, Numerical Recipes, or any other source I looked at since I started). Cheers, KeithC. First, please look up `too' in your dictionary. Second, please study the references on the help page, which give the details. That is what references are for! The references will also answer your question about the reference distribution. The help page does not say it is `normalized' at all: it says it computes the peridogram, and you seem unaware of the definitions of the latter (and beware, there are more than one). On Tue, 24 Jan 2006, Keith Chamberlain wrote: __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
Re: [R] R-help Digest, Vol 35, Issue 23
summary.aov(aovRes, split=list(interval = list(i1 vs i2 = 1, i2 vs i3 = 2, i3 vs i4 = 3, i4 vs i5 = 4, i5 vs i6 = 5))) try class(aovRes) #- aovlist ! summary.aovlist(aovRes, spit=...) or simply summary(aovRes, spit=...) Hoping this helps, Herwig -- Dr. Herwig Meschke Wissenschaftliche Beratung Hagsbucher Weg 27 D-89150 Laichingen phone +49 7333 210 417 / fax +49 7333 210 418 email [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] r-help, how can i use my own distance matrix without using dist()
Dear R-helpers, i am a beginner of R and i am using cluster package to do hierarchical clustering i am wondering if i can use my own distance matrix to do the hierarchical clustering without using dist() function. if i have my own distance matrix, how can i ask hclust() function to recongnize it( as the output of dist() function). thank you very much and i looking forward to hearing from you. Marshall __ 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] r-help, how can i use my own distance matrix without usin g dist()
Use something like hclust(as.dist(mydist), ...) ought to work. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 4:47 PM To: r-help@stat.math.ethz.ch Subject: [R] r-help, how can i use my own distance matrix without using dist() Dear R-helpers, i am a beginner of R and i am using cluster package to do hierarchical clustering i am wondering if i can use my own distance matrix to do the hierarchical clustering without using dist() function. if i have my own distance matrix, how can i ask hclust() function to recongnize it( as the output of dist() function). thank you very much and i looking forward to hearing from you. Marshall __ 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] r-help, how can i use my own distance matrix without using dist()
see ?dist there's an example x - matrix(rnorm(100), nrow=5) m - as.matrix(dist(x)) d - as.dist(m) 'as.dist' is what you're probably looking for regards, Marco [EMAIL PROTECTED] wrote: Dear R-helpers, i am a beginner of R and i am using cluster package to do hierarchical clustering i am wondering if i can use my own distance matrix to do the hierarchical clustering without using dist() function. if i have my own distance matrix, how can i ask hclust() function to recongnize it( as the output of dist() function). thank you very much and i looking forward to hearing from you. Marshall __ 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 - Photo Books. You design it and well bind it! [[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] R-help Digest, Vol 35, Issue 14
On Sun, 15 Jan 2006, Werner Wernersen wrote: Dear all, Is anybody aware of a tutorial, introduction, overview or alike for cluster analysis with R? I have been searching for something like that but it seems there are only a few rather specialized articles around. As an overview (rather than an introduction or tutorial), the Cluster task view might be helpful to you: http://CRAN.R-project.org/src/contrib/Views/Cluster.html Z I would very much appreciate any hint. Thanks a million, Werner ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de __ 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] R-help Digest, Vol 35, Issue 14
Dear all, Is anybody aware of a tutorial, introduction, overview or alike for cluster analysis with R? I have been searching for something like that but it seems there are only a few rather specialized articles around. I would very much appreciate any hint. Thanks a million, Werner ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de __ 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] R-help Digest, Vol 35, Issue 14
On Sun, 15 Jan 2006, Werner Wernersen wrote: Is anybody aware of a tutorial, introduction, overview or alike for cluster analysis with R? I have been searching for something like that but it seems there are only a few rather specialized articles around. Chapter 11 of MASS (the book discussed in the FAQ). -- 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
Re: [R] R-help Digest, Vol 35, Issue 7
Uwe Ligges пишет: Evgeniy Kachalin wrote: Hello, dear participants! Could you tip me, is there any simple and nice way to build scatter-plot for three different types of data (, and o and * - signs, for example) with legend. Now i can guess only that way: plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue') points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green') points( etc What is the simple and nice way? Thank you very much for your kindness and help. Example: with(iris, plot(Sepal.Length, Sepal.Width, pch = as.integer(Species))) with(iris, legend(7, 4.4, legend = unique(as.character(Species)), pch = unique(as.integer(Species Uwe, sorry for my stupid question. You mean that when pch=factor , plot can recycle the factor and use it for subscripts or marks. Then pch=as.integer(Species) results in c(1,2,3) for 3 factor levels. And I need symbols 15,16,17 and colors red, blue, green. So then I do: iris$Species-spec.symb iris$Species-spec.col levels(spec.symb)-c(15,16,17) levels(spec.col)-c('red','green','blue') That's the only way? More of that!!! 'Plot' does not like factors in 'pch'. So it must be so: plot(x~y,data, pch=as.integer(as.character(spec.symb))). That's totally crazy... -- Evgeniy __ 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] R-help Digest, Vol 35, Issue 7
Hi! Just use your factors for indexing c(15,16,17) and c(red,green,blue). So, with the iris data: with(iris, plot(Sepal.Length, Sepal.Width, pch=c(15,16,17)[as.integer(Species)], col=c(red,green,blue)[as.integer(Species)] )) Best regards, Kyosti Kurikka Evgeniy Kachalin wrote: Hello, dear participants! Could you tip me, is there any simple and nice way to build scatter-plot for three different types of data (, and o and * - signs, for example) with legend. Now i can guess only that way: plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue') points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green') points( etc What is the simple and nice way? Thank you very much for your kindness and help. Example: with(iris, plot(Sepal.Length, Sepal.Width, pch = as.integer(Species))) with(iris, legend(7, 4.4, legend = unique(as.character(Species)), pch = unique(as.integer(Species Uwe, sorry for my stupid question. You mean that when pch=factor , plot can recycle the factor and use it for subscripts or marks. Then pch=as.integer(Species) results in c(1,2,3) for 3 factor levels. And I need symbols 15,16,17 and colors red, blue, green. So then I do: iris$Species-spec.symb iris$Species-spec.col levels(spec.symb)-c(15,16,17) levels(spec.col)-c('red','green','blue') That's the only way? More of that!!! 'Plot' does not like factors in 'pch'. So it must be so: plot(x~y,data, pch=as.integer(as.character(spec.symb))). That's totally crazy... -- Evgeniy __ 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] R-help Digest, Vol 35, Issue 7
Evgeniy Kachalin wrote: Uwe Ligges пишет: Evgeniy Kachalin wrote: Hello, dear participants! Could you tip me, is there any simple and nice way to build scatter-plot for three different types of data (, and o and * - signs, for example) with legend. Now i can guess only that way: plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue') points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green') points( etc What is the simple and nice way? Thank you very much for your kindness and help. Example: with(iris, plot(Sepal.Length, Sepal.Width, pch = as.integer(Species))) with(iris, legend(7, 4.4, legend = unique(as.character(Species)), pch = unique(as.integer(Species Uwe, sorry for my stupid question. You mean that when pch=factor , plot can recycle the factor and use it for subscripts or marks. Yes, it can recycle, but in the example above it does not recycle but takes the whole Species vector. Then pch=as.integer(Species) results in c(1,2,3) for 3 factor levels. And I need symbols 15,16,17 and colors red, blue, green. What about adding 14 as in as.integer(Species)+14, or 1 for the colors, respectively? So then I do: iris$Species-spec.symb iris$Species-spec.col levels(spec.symb)-c(15,16,17) levels(spec.col)-c('red','green','blue') That's the only way? This is one qay of many. More of that!!! 'Plot' does not like factors in 'pch'. So it must be so: plot(x~y,data, pch=as.integer(as.character(spec.symb))). That's totally crazy... You can set up your own pch variable of course, if you don't like it this fast and easy way. Uwe Ligges __ 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] R-help Digest, Vol 35, Issue 7
Hello, dear participants! Could you tip me, is there any simple and nice way to build scatter-plot for three different types of data (, and o and * - signs, for example) with legend. Now i can guess only that way: plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue') points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green') points( etc What is the simple and nice way? Thank you very much for your kindness and help. -- Evgeniy Kachalin __ 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] R-help Digest, Vol 35, Issue 7
Evgeniy Kachalin wrote: Hello, dear participants! Could you tip me, is there any simple and nice way to build scatter-plot for three different types of data (, and o and * - signs, for example) with legend. Now i can guess only that way: plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue') points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green') points( etc What is the simple and nice way? Thank you very much for your kindness and help. Example: with(iris, plot(Sepal.Length, Sepal.Width, pch = as.integer(Species))) with(iris, legend(7, 4.4, legend = unique(as.character(Species)), pch = unique(as.integer(Species Uwe Ligges __ 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] R-help: gls with correlation=corARMA
Thank you for your extra efforts in pinpointing the source of my problem. That is a smart workaround, to reduce the parameters until invertibility conditions are satisfied. The concern in my case is what effect the constant will have on the covariance matrix and the resulting estimates for the slope in the model. I might look at other cases where the invertibility condition was satisfied and compare the slope estimates and standard errors for the unscaled and scaled time series parameters. The example below was one of many series. I should have been quicker to realize that someone might use the same form as my example to mess with someones machine. I have used tryCatch over the weekend to skip the gls fit in cases where this error occurred (4282 out of 187283 series). There were no errors when I fit a (0,0,1)x(0,0,1) model (e.g. q=13), instead of q=25. Thank you again for your time and explanation. Sincerely, Steve Gaffigan On Sun, 11 Dec 2005, Spencer Graves wrote: The error message is misleading. It should say something like, Error in corARMA(q = 25, value = -ma.coefs, fixed = T) : The moving average process specified is not invertible, having roots outside the unit circle. Instead it says, Error in corARMA(q = 25, value = -ma.coefs, fixed = T) : All parameters must be less than 1 in absolute value. I'm copying Doug Bates on this reply in case he wants to try to fix this. I got an answer just by shrinking your ma.coefs' by a factor of 0.8: mod.gls=gls(obs~model,correlation=corARMA(q=25,value=0.8*ma.coefs,fixed=T), method=ML) This seemed to produce an answer for me; it least it did not give me an error message. In case you are interested in how I determined this, I will outline the steps I took in analyzing this problem. First, I copied the web address you gave for the data into a web browser to make sure it was honest text and not something that might corrupt my computer. You are to be commended for providing an example that allowed me to replicate your problem. If the example had been smaller and simpler, it would have made my job easier and might have gotten you an earlier reply from someone else. Then I ran your code and got the error you reported: ... mod.gls=gls(obs~model, + correlation=corARMA(q=25,value=ma.coefs,fixed=T), + method=ML) Error in corARMA(q = 25, value = ma.coefs, fixed = T) : All parameters must be less than 1 in absolute value Next, I considered ways to simplify this problem and still get the same error message. I decided to try the corARMA part by itself: corARMA(q=25,value=ma.coefs,fixed=T) Error in corARMA(q = 25, value = ma.coefs, fixed = T) : All parameters must be less than 1 in absolute value Progress. Then I typed corARMA at a command prompt and copied the code into a scrit file. The I typed debug(corARMA) and repeated the corARMA(...) command. After tracing through the corARMA code line by line, I found that the error message is issued from '.C(ARMA_unconstCoef, ...)'. I gave that up: This approach did not help in this case, thoug it has in others. Then I tried some simpler examples: 'corARMA(q=1,value=.5,fixed=T)' and 'corARMA(q=1,value=-.5,fixed=T)' did NOT give me that error message, but 'corARMA(q=2,value=c(.8, -.5),fixed=T)' did. Then I checked a time series book for the conditions for invertibility. I found that all the roots of the characteristic equation must lie outside the unit circle. So I checked the following: round(Mod(polyroot(c(1, ma.coefs))), 3) [1] 1.069 0.995 0.995 0.995 0.995 0.995 0.995 0.995 0.995 1.069 1.069 1.069 [13] 0.995 0.995 0.995 0.995 1.069 1.069 1.069 1.069 1.069 1.069 1.069 1.069 [25] 1.930 Then I shrunk the ma.coefs' by 0.999 and got larger roots but still some inside the unit circle. So I tried 0.99 and 0.9 with the same result. With 0.8, all the roots were outside the unit circle. hope this helps. spencer graves [EMAIL PROTECTED] wrote: Dear Madams/Sirs, Hello. I am using the gls function to specify an arma correlation during estimation in my model. The parameter values which I am sending the corARMA function are from a previous fit using arima. I have had some success with the method, however in other cases I get the following error from gls: All parameters must be less than 1 in absolute value. None of the parameters (individually) are greater than or equal to 1. Please copy the code below into R to reproduce the error. Thanks. Is my logic incorrect? In the corARMA function, there's a call to pre-compiled C code with the name ARMA_unconstCoef. Is the source code for such compiled code freely available for download? Thanks for your suggestions. Sincerely Steve Gaffigan
Re: [R] R-help Digest, Vol 34, Issue 14
Guten Tag, Ich bin vom 12. bis 23. Dezember 2005 im Militär-WK. Ich werde die Mails somit nur verzögert beantworten können. Für dringende Fälle: Während diesen zwei Wochen bin ich via Natel (am besten per SMS) erreichbar unter der Nummer 079 438 27 68. Mit freundlichem Gruss Dominik Schaub __ 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] R-help: gls with correlation=corARMA
The error message is misleading. It should say something like, Error in corARMA(q = 25, value = -ma.coefs, fixed = T) : The moving average process specified is not invertible, having roots outside the unit circle. Instead it says, Error in corARMA(q = 25, value = -ma.coefs, fixed = T) : All parameters must be less than 1 in absolute value. I'm copying Doug Bates on this reply in case he wants to try to fix this. I got an answer just by shrinking your ma.coefs' by a factor of 0.8: mod.gls=gls(obs~model,correlation=corARMA(q=25,value=0.8*ma.coefs,fixed=T), method=ML) This seemed to produce an answer for me; it least it did not give me an error message. In case you are interested in how I determined this, I will outline the steps I took in analyzing this problem. First, I copied the web address you gave for the data into a web browser to make sure it was honest text and not something that might corrupt my computer. You are to be commended for providing an example that allowed me to replicate your problem. If the example had been smaller and simpler, it would have made my job easier and might have gotten you an earlier reply from someone else. Then I ran your code and got the error you reported: ... mod.gls=gls(obs~model, + correlation=corARMA(q=25,value=ma.coefs,fixed=T), + method=ML) Error in corARMA(q = 25, value = ma.coefs, fixed = T) : All parameters must be less than 1 in absolute value Next, I considered ways to simplify this problem and still get the same error message. I decided to try the corARMA part by itself: corARMA(q=25,value=ma.coefs,fixed=T) Error in corARMA(q = 25, value = ma.coefs, fixed = T) : All parameters must be less than 1 in absolute value Progress. Then I typed corARMA at a command prompt and copied the code into a scrit file. The I typed debug(corARMA) and repeated the corARMA(...) command. After tracing through the corARMA code line by line, I found that the error message is issued from '.C(ARMA_unconstCoef, ...)'. I gave that up: This approach did not help in this case, thoug it has in others. Then I tried some simpler examples: 'corARMA(q=1,value=.5,fixed=T)' and 'corARMA(q=1,value=-.5,fixed=T)' did NOT give me that error message, but 'corARMA(q=2,value=c(.8, -.5),fixed=T)' did. Then I checked a time series book for the conditions for invertibility. I found that all the roots of the characteristic equation must lie outside the unit circle. So I checked the following: round(Mod(polyroot(c(1, ma.coefs))), 3) [1] 1.069 0.995 0.995 0.995 0.995 0.995 0.995 0.995 0.995 1.069 1.069 1.069 [13] 0.995 0.995 0.995 0.995 1.069 1.069 1.069 1.069 1.069 1.069 1.069 1.069 [25] 1.930 Then I shrunk the ma.coefs' by 0.999 and got larger roots but still some inside the unit circle. So I tried 0.99 and 0.9 with the same result. With 0.8, all the roots were outside the unit circle. hope this helps. spencer graves [EMAIL PROTECTED] wrote: Dear Madams/Sirs, Hello. I am using the gls function to specify an arma correlation during estimation in my model. The parameter values which I am sending the corARMA function are from a previous fit using arima. I have had some success with the method, however in other cases I get the following error from gls: All parameters must be less than 1 in absolute value. None of the parameters (individually) are greater than or equal to 1. Please copy the code below into R to reproduce the error. Thanks. Is my logic incorrect? In the corARMA function, there's a call to pre-compiled C code with the name ARMA_unconstCoef. Is the source code for such compiled code freely available for download? Thanks for your suggestions. Sincerely Steve Gaffigan data=read.table(http://ak.aoos.org/data/sample_070989.dat,header=T) attach(data) mod.ols=lm(obs~model) mod.sma=arima(residuals(mod.ols),order=c(0,0,1),seasonal=list(order=c(0,0,2),period=12)) theta.1=mod.sma$coef[1] THETA.1=mod.sma$coef[2] THETA.2=mod.sma$coef[3] ma.coefs=c(-theta.1,double(10),-THETA.1,theta.1*THETA.1,double(10),-THETA.2,theta.1*THETA.2) library(nlme) mod.gls=gls(obs~model,correlation=corARMA(q=25,value=ma.coefs,fixed=T),method=ML) detach(data) __ 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 -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
[R] R-help: gls with correlation=corARMA
Dear Madams/Sirs, Hello. I am using the gls function to specify an arma correlation during estimation in my model. The parameter values which I am sending the corARMA function are from a previous fit using arima. I have had some success with the method, however in other cases I get the following error from gls: All parameters must be less than 1 in absolute value. None of the parameters (individually) are greater than or equal to 1. Please copy the code below into R to reproduce the error. Thanks. Is my logic incorrect? In the corARMA function, there's a call to pre-compiled C code with the name ARMA_unconstCoef. Is the source code for such compiled code freely available for download? Thanks for your suggestions. Sincerely Steve Gaffigan data=read.table(http://ak.aoos.org/data/sample_070989.dat,header=T) attach(data) mod.ols=lm(obs~model) mod.sma=arima(residuals(mod.ols),order=c(0,0,1),seasonal=list(order=c(0,0,2),period=12)) theta.1=mod.sma$coef[1] THETA.1=mod.sma$coef[2] THETA.2=mod.sma$coef[3] ma.coefs=c(-theta.1,double(10),-THETA.1,theta.1*THETA.1,double(10),-THETA.2,theta.1*THETA.2) library(nlme) mod.gls=gls(obs~model,correlation=corARMA(q=25,value=ma.coefs,fixed=T),method=ML) detach(data) __ 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] R-help: gls with correlation=corARMA
Dear Madams/Sirs, Hello. I am using the gls function to specify an arma correlation during estimation in my model. The parameter values which I am sending the corARMA function are from a previous fit using arima. I have had some success with the method, however in other cases I get the following error from gls: All parameters must be less than 1 in absolute value. None of the parameters (individually) are greater than or equal to 1. Please copy the code below into R to reproduce the error. Thanks. Is my logic incorrect? In the corARMA function, there's a call to pre-compiled C code with the name ARMA_unconstCoef. Is the source code for such compiled code freely available for download? Thanks for your suggestions. Sincerely Steve Gaffigan data=read.table(http://ak.aoos.org/data/sample_070989.dat,header=T) attach(data) mod.ols=lm(obs~model) mod.sma=arima(residuals(mod.ols),order=c(0,0,1),seasonal=list(order=c(0,0,2),period=12)) theta.1=mod.sma$coef[1] THETA.1=mod.sma$coef[2] THETA.2=mod.sma$coef[3] ma.coefs=c(-theta.1,double(10),-THETA.1,theta.1*THETA.1,double(10),-THETA.2,theta.1*THETA.2) library(nlme) mod.gls=gls(obs~model,correlation=corARMA(q=25,value=ma.coefs,fixed=T),method=ML) detach(data) -- Alaska Ocean Observing System School of Fisheries and Ocean Sciences : University of Alaska Fairbanks __ 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] R-help Digest, Vol 33, Issue 27
From: Duncan Murdoch [EMAIL PROTECTED] I'd recommend using the RWinEdt package instead for a different way to integrate winedit with R. winedit and winedt are two different editors, last I checked. best, -tony [EMAIL PROTECTED] Muttenz, Switzerland. Commit early,commit often, and commit in a repository from which we can easily roll-back your mistakes (AJR, 4Jan05). __ 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] R-help: conversion of long decimal numbers into hexadecimal
Hi there, could somebody help me to convert a decimal number into a hexadecimal number? I know that there is the function sprintf, but the numbers I want to convert consist of 20 or more numbers. Spintf is not able to convert these big numbers. Thanks for any help. Antje [[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] R-help: conversion of long decimal numbers into hexadecimal numbers
Hi there, could somebody help me to convert a decimal number into a hexadecimal number? I know that there is the function sprintf, but the numbers I want to convert consist of 20 or more numbers. Spintf is not able to convert these big numbers. Thanks for any help. Antje Döring [[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] R-help: conversion of long decimal numbers into hexadeci
On 10-Nov-05 Antje Döring wrote: Hi there, could somebody help me to convert a decimal number into a hexadecimal number? I know that there is the function sprintf, but the numbers I want to convert consist of 20 or more numbers. Spintf is not able to convert these big numbers. If I understand aright, you have decimal integers with 20 or more digits (and you want to get these as hexadecimal). You are probably out of luck for a direct approach, since 10^20 2^64 (indeed 2^66), so you will have overflowed a 64-bit integer. However, I'm not sure what the limitations on integer types are in R on all platforms. If, however, all you need is to do these conversions, and you do not really need to use R (how off-topic can I get ... ?), then (at any rate on Linux/Unix systems where the program is installed by default) you can use the aribitrary-precision calculator 'bc'. Session: $ bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. obase=16 1234567898765432123456789 1056E0F555A18EBDA7D15 123456789876543212345678987654321 6163E6712EBBAA4E3D62B41F4B1 12345678987654321234567898765432123456789876543212345678987654321 1E02BC221DC9369C8981C6F859501BD313D339F09180862B41F4B1 quit Und so weiter ... and of course you can go in the opposite direction by ibase=16 (to set hex as the input base) and obase=10 (to set decimal as the output base). 'bc' is a classic Unix tool, and features as an illoustration of complex programming in C, with lex and yacc and all, in The Unix Programming Environment (as I recall) by Kernighan and Ritchie. I don't need it often, but when you need it it's very handy (e.g. now). Hoping this helps, Ted. PS: $ bc -l bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. scale=1000 pi=4*a(1) pi 3.141592653589793238462643383279502884197169399375105820974944592307\ 81640628620899862803482534211706798214808651328230664709384460955058\ 22317253594081284811174502841027019385211055596446229489549303819644\ 28810975665933446128475648233786783165271201909145648566923460348610\ .. 08302642522308253344685035261931188171010003137838752886587533208381\ 42061717766914730359825349042875546873115956286388235378759375195778\ 18577805321712268066130019278766111959092164201988 (last digit wrong because of truncation) E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 10-Nov-05 Time: 17:28:05 -- 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
[R] R help
Dear Sir/Madam, My purpose is to write an R function to solve the quadratic equation ax2+bx+c=0. The input should be an array of a, b, and c from a data set a b c 1 4 3 1 4 5 0 2 5 0 0 6 The output with the possibility of complex roots and one root or no root should look like the following. ABCREAL1IM1REAL2IM2 143 -1.0 . -3 . 145 -2.0 1 -2 -1 025 -2.5 .. . 006 . .. . I get the code in reading in the coefficient data and outputing the results to a data set for eventual printing. Please help me in adding the R code that solves for the quadratic in place of the comments. a - c(1,1,0,0) b - c(4,4,0,0) c - c(3,5,5,6) SolveQuad - function(a,b,c) { ## Put the answer in y.solution a vector of length 4 y.solution - rep(-999,4) if (a == 0) { if (b!= 0) {y.solution[1]- -1*c/b} } else ## Put your R code here } else { ## Put your R code here } y.solution } # Interate through the coefficients y - matrix(0,nrow=4,ncol=4) for (k in 1:4) { y[k,] -SolveQuad(a[k],b[k],c[k]) } y Thanks very much for all the help! yuying shi [[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] R-help Digest, Vol 32, Issue 26
r-help@stat.math.ethz.ch on Wednesday, October 26, 2005 at 6:00 AM -0500 wrote: Ronaldo, Try Harold's suggestion. The df still won't agree, because lmer (at least in its current version) just puts an upper bound on the df. But that should be OK, because all those t tests are approximations anyways, and you can get better confidence intervals (credible intervals, whatever) by using the mcmcsamp() function that works with lmer() alan Doran, Harold [EMAIL PROTECTED] responded: There is an issue with implicit nesting in lmer. In your lme() model you nest block/irrigation/density/fertilizer. In lmer you need to do something like (I dind't include all of your variables, but I think the makes the point) lmer(yield~irrigation*density*fertilizer+(1|fertilizer:density)+(1|density), data) Which notes that fertilizer is nested in density. Try this and then compare the results. Ronaldo Reis-Jr. [EMAIL PROTECTED], wrote: I make the correct model with aov, lme do compare with lmer. But I cant make a correct model in lmer. Look that the aov and lme results are similars, but very different from lmer. In aov and lme is used the correct DF for each variable, in lmer it use a same DF for all? Denom=54. -- Alan B. Cobo-Lewis, Ph.D. (207) 581-3840 tel Department of Psychology(207) 581-6128 fax University of Maine Orono, ME 04469-5742[EMAIL PROTECTED] http://www.umaine.edu/visualperception __ 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] R-help Digest, Vol 32, Issue 26
In addition to the response below, Doug Bates has talked about this on this list previously. I did RSiteSearch('bates degrees of freedom lmer') The first one that came up has Doug's response to this question as well Harold -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Cobo-Lewis Sent: Wednesday, October 26, 2005 8:53 AM To: r-help@stat.math.ethz.ch Subject: Re: [R] R-help Digest, Vol 32, Issue 26 r-help@stat.math.ethz.ch on Wednesday, October 26, 2005 at 6:00 AM -0500 wrote: Ronaldo, Try Harold's suggestion. The df still won't agree, because lmer (at least in its current version) just puts an upper bound on the df. But that should be OK, because all those t tests are approximations anyways, and you can get better confidence intervals (credible intervals, whatever) by using the mcmcsamp() function that works with lmer() alan Doran, Harold [EMAIL PROTECTED] responded: There is an issue with implicit nesting in lmer. In your lme() model you nest block/irrigation/density/fertilizer. In lmer you need to do something like (I dind't include all of your variables, but I think the makes the point) lmer(yield~irrigation*density*fertilizer+(1|fertilizer:density)+(1|den sity), data) Which notes that fertilizer is nested in density. Try this and then compare the results. Ronaldo Reis-Jr. [EMAIL PROTECTED], wrote: I make the correct model with aov, lme do compare with lmer. But I cant make a correct model in lmer. Look that the aov and lme results are similars, but very different from lmer. In aov and lme is used the correct DF for each variable, in lmer it use a same DF for all? Denom=54. -- Alan B. Cobo-Lewis, Ph.D. (207) 581-3840 tel Department of Psychology(207) 581-6128 fax University of Maine Orono, ME 04469-5742[EMAIL PROTECTED] http://www.umaine.edu/visualperception __ 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] R-help Digest, Vol 31, Issue 30
With lme4, use of mcmcsamp can be insightful. (Douglas Bates drew my attention to this function in a private exchange of emails.) The distributions of random effects are simulated on a log scale, where the distributions are much closer to symmetry than on the scale of the random effects themselves. As far as I can see, this is a straightforward use of MCMC to estimate model parameters; it is not clear to me the results from the lmer() fit are used. John Maindonald. On 30 Sep 2005, at 8:00 PM, [EMAIL PROTECTED] wrote: From: Roel de Jong [EMAIL PROTECTED] Date: 29 September 2005 11:19:38 PM To: r-help@stat.math.ethz.ch Subject: [R] standard error of variances and covariances of the randomeffects with LME Hello, how do I obtain standard errors of variances and covariances of the random effects with LME comparable to those of for example MlWin? I know you shouldn't use them because the distribution of the estimator isn't symmetric blablabla, but I need a measure of the variance of those estimates for pooling my multiple imputation results. Regards, Roel. John Maindonald email: [EMAIL PROTECTED] phone : +61 2 (6125)3473fax : +61 2(6125)5549 Centre for Bioinformation Science, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. __ 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] R-help Digest, Vol 31, Issue 9
?summary.lm and check the Value section. Wuming On 9/10/05, Ping Yao [EMAIL PROTECTED] wrote: Hi: I use lm (linear model) to analyze 47 variables , 8 responses So I use loop to finish it . I want the program to show the results that P-value is less than 0.05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat-y_x[,j] gen.fat-as.numeric(gen.fat) snp_marker-y_x[,i] x-colnames(y_x) #snp_marker-as.matrix(snp_marker) #mode(snp_marker) cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) zz-summary(lm.D9 - lm(gen.fat~snp_marker)) print(zz) return } } [[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] R-help Digest, Vol 31, Issue 9
Hi Ping, You can use zz$coefficients[,4] to get the p values for each estimated coefficients in your context. Wuming On 9/11/05, Ping Yao [EMAIL PROTECTED] wrote: Wuming: Thanks for your help. I use the fuction: call(fstatistic,zz) call(p-value,zz) I can get each variable P-values,but I can't get P-value of the model. How can I do ? one of the results is following : Call: lm(formula = gen.fat ~ snp_marker) Residuals: Min 1Q Median 3Q Max -10.5455 -3.0481 0.4545 3.9519 6.9519 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept)13.0481 0.4518 28.881 2e-16 *** snp_markerallele2 0.5107 0.9102 0.561 0.5753 snp_markerBoth 1.4974 0.6927 2.162 0.0318 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.607 on 212 degrees of freedom Multiple R-Squared: 0.02166,Adjusted R-squared: 0.01244 F-statistic: 2.347 on 2 and 212 DF, p-value: 0.0981 I use the code : zz-summary(lm.D9 - lm(gen.fat~snp_marker)) coe-coef(lm.D9)# the bare coefficients if (coe[2]=.05||coe[3]=.05||coe[4]=.05||coe[5]=.05) { cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) sign-call(fstatistic,zz) call(p-value,zz) #print(coe) print(zz) } On 9/10/05, Wuming Gong [EMAIL PROTECTED] wrote: ?summary.lm and check the Value section. Wuming On 9/10/05, Ping Yao [EMAIL PROTECTED] wrote: Hi: I use lm (linear model) to analyze 47 variables , 8 responses So I use loop to finish it . I want the program to show the results that P-value is less than 0.05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat-y_x[,j] gen.fat-as.numeric(gen.fat) snp_marker-y_x[,i] x-colnames(y_x) #snp_marker-as.matrix(snp_marker) #mode(snp_marker) cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) zz-summary( lm.D9 - lm(gen.fat~snp_marker)) print(zz) return } } [[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] R-help Digest, Vol 31, Issue 9
Hi: I use lm (linear model) to analyze 47 variables , 8 responses So I use loop to finish it . I want the program to show the results that P-value is less than 0.05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat-y_x[,j] gen.fat-as.numeric(gen.fat) snp_marker-y_x[,i] x-colnames(y_x) #snp_marker-as.matrix(snp_marker) #mode(snp_marker) cat(phenotype is = ,x[j] , \n) cat(snp marker is = ,x[i] , \n) zz-summary(lm.D9 - lm(gen.fat~snp_marker)) print(zz) return } } [[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] R-help Digest, Vol 30, Issue 26
Dear R helpers, For me ( i.e. R 2.1.1 on Mac OS X), using trellis.device (postscript, onefile = F, etc ... with the lattice library within a R function works fine to obtain the desired graph as an EPS file , provided that : 1) the command dev.off() is not included in this function 2) and it is issued at the command level after the function has been exited I would like to know if there is a way to close the EPS file within the function itself, freeing the user to issue the closing command (I already tried trellis.device (), and trellis.device (null) without any success). Regards, J.-M. Jean-Marc Ottorini LERFoB, UMR INRA-ENGREF 1092 email [EMAIL PROTECTED] INRA - Centre de Nancy voice +33-0383-394046F54280 - Champenoux fax+33-0383-394034 France __ 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] R-help
Diego, Have you checked out the home site for nls2? Specifically the system requirements page? http://www.inra.fr/miaj/public/AB/nls2/available.html That says that nls2 requires a Unix-like operating system. Basically, the script for building the library is for such systems only, it also depends upon a lex (flex) library being available. Regards, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of HM Diego Hernán Sent: 22 August 2005 18:47 To: r-help@stat.math.ethz.ch Subject: [R] R-help Hello I need help with the way to install nls2 library for windows, or the script that can be used for install the nls2 library. Do you know if this library works in windows? Best regards. Diego Rojas Cali-Colombia __ 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] R Help
Hi, I have query regarding R Rserve. In Rserve, there is a way to capture Errors by RSrvException class, but is there any way to capture warning messages? I have found that there is warnings() command in R, which lists the last warning message, but I am not able to get the warning message in java program by executing the following line: REXP rx = null; rx = connection.eval(x-sqrt(-9)); // will generate warning message connection.eval(warnings()).asString(); // this displays null instead of warning message Please reply me correct way, if any, to display warning message. Regards, Nikhil Shah [[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] R-help Digest, Vol 30, Issue 6
On Fri, 5 Aug 2005 Julia Reid wrote: Subject: [R] GAP pointer I am trying to do a simple segregation analysis using the GAP package. I have the documentation for pointer but I desperately need an example so that I can see how to format the datfile and the jobfile. For each individual, I have FamilyId, SubjectId, FatherId, MotherId, and AffectedStatus (0/1). I would like to obtain the likelihood ratio statistic for transmission. I would greatly appreciate any help on this subject. Best to all, Julia Reid I wouldn't use Pointer myself (there are lots of more recent packages*), but look at the examples in http://cedar.genetics.soton.ac.uk/pub/PROGRAMS/pointer/pointer.tar.Z and the manual, which is in the book: Morton N.E., Rao D.C Lalouel J-M (1983). Methods in Genetic Epidemiology. Karger PO Box, CH-4009 Basel (Switzerland). ISBN 3-8055-3668-2 which you will find in many academic libraries. David Duffy. * Don't you use Pap or JPap at Myriad? __ 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] R-help Digest, Vol 28, Issue 28
On Tuesday 28 June 2005 15:30, [EMAIL PROTECTED] wrote: Re : 37. Re: A. Mani : colours in Silhouette (Mulholland, Tom) Message: 37 Date: Tue, 28 Jun 2005 09:08:24 +0800 From: Mulholland, Tom [EMAIL PROTECTED] Subject: Re: [R] A. Mani : colours in Silhouette To: [EMAIL PROTECTED], r-help@stat.math.ethz.ch Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-1 It's not so much a problem, as not working the way you expected. cluster:::plot.partition is used to do the plotting. If you look at the code for this you can see the difficulty in putting every possible permutation into the code. If for example you want the silhouette plot to be red using col = red is not intuitive as the cluster plot (which comes up first) has more than one colour. If you have a look at methods(plot) (assuming that you have loaded the cluster package) you will see that there is a specific piece of code in the form of plot.silhouette. It has an asterisk next to it so you need to use cluster:::plot.silhouette to see the code. It has what you need. args(cluster:::plot.silhouette) function (x, nmax.lab = 40, max.strlen = 5, main = NULL, sub = NULL, xlab = expression(Silhouette width * s[i]), col = gray, do.col.sort = length(col) 1, border = 0, cex.names = par(cex.axis), do.n.k = TRUE, do.clus.stat = TRUE, ...) data(ruspini) pr4 - pam(ruspini, 4) si - silhouette(pr4) plot(si,col = red) I tried that before with many more options and got a blank image. It must have been due to the options. The issue is that whenever code is written there is always a choice as to what functionality is put in place. Just because something can be done, does not mean it will or in some cases should be done. In this case the help for plot.partition notes that For more flexibility, use 'plot(silhouette(x), ...)', see 'plot.silhouette'. Tom Thanks for that I found out something I will find useful in the future. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of A. Mani Sent: Tuesday, 28 June 2005 4:30 AM To: r-help@stat.math.ethz.ch Subject: [R] A. Mani : colours in Silhouette Hello, In cluster analysis with cluster, how does one colour the silhouette plots ? For example in using pam. There seems to be some problem there. Everything else can be coloured. Thanks, A. Mani Member, Cal. Math. Soc __ 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] r-help
There is a function 'simMD()' in 'popgen' library which simulates a sample of genotype data as follows: library(popgen) x - simMD(20, 2, 2, p = NULL, c(0.09, 0.05), ac = 2, beta = 1) x , , 1 [,1] [,2] [1,]11 [2,]11 ... [37,]12 [38,]22 [39,]22 [40,]22 , , 2 [,1] [,2] [1,]22 [2,]12 [3,]12 ... [38,]21 [39,]12 [40,]12 How can I repeat this function, for example, 1000 times to generate 1000 samples and assign each output to distinct 'vector' Xi, where i=1,2,...,1000 The goal is to generate a large number of samples using this function and then use them in further analysis. Any suggestions would be appreciated Sitdikov Mansor __ 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] r-help
Sotdikov Mansor wrote: There is a function 'simMD()' in 'popgen' library which package, not library. simulates a sample of genotype data as follows: library(popgen) x - simMD(20, 2, 2, p = NULL, c(0.09, 0.05), ac = 2, beta = 1) x , , 1 [,1] [,2] [1,]11 [2,]11 ... [37,]12 [38,]22 [39,]22 [40,]22 , , 2 [,1] [,2] [1,]22 [2,]12 [3,]12 ... [38,]21 [39,]12 [40,]12 How can I repeat this function, for example, 1000 times to generate 1000 samples and assign each output to distinct 'vector' Xi, where i=1,2,...,1000 The above does not look like a vector (even if internally represented as such). The goal is to generate a large number of samples using this function and then use them in further analysis. I'd write them into a list by replicate(1000, YourCall) If you really want objects X1, ..., Xn, you should read the FAQ and ?assign. Uwe Ligges Any suggestions would be appreciated Sitdikov Mansor __ 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