Re: [R] package installation from source

2009-10-19 Thread Petr PIKAL
Hi Duncan Murdoch murd...@stats.uwo.ca napsal dne 16.10.2009 17:01:59: On 10/16/2009 9:31 AM, Petr PIKAL wrote: Dear all I noticed from NEWS 2.11.0,dev SIGNIFICANT USER-VISIBLE CHANGES o Packages must have been installed under R 2.10.0 or later, as the current help

Re: [R] Filtering on a dataframe- newbie question

2009-10-19 Thread Peter Ehlers
Rolf Turner wrote: On 19/10/2009, at 4:23 PM, milton ruser wrote: Hi there, Try ?subset No. Don't. Just do: X - dataframe[dataframe$Name=='T44',] Note the comma in the penultimate position. Read up on array indexing; see ?[ and An Introduction to R, section 5.2

[R] speech spectogram

2009-10-19 Thread rajesh j
Hi, I need to plot a spectogram for a speech signal. Is there a package that can do this? -- Rajesh.J [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Odp: : Question about correlation between data.

2009-10-19 Thread Petr PIKAL
David Scott d.sc...@auckland.ac.nz napsal dne 17.10.2009 03:01:35: Petr PIKAL wrote: Hi r-help-boun...@r-project.org napsal dne 16.10.2009 15:24:05: hi everybody, I'm a student, and I'm new using R! I'm looking for statistical help hoping somebody can answer me! This is my

Re: [R] What an element in loading is missing? (princomp)

2009-10-19 Thread Peter Ehlers
Peng Yu wrote: Please see below that [3,1] of loadings is not printed. I am wondering what the problem is? Not trying ?loadings, perhaps?? -Peter Ehlers set.seed(0) m=10 n=4 X=replicate(n,rnorm(m)) pca_result=princomp(X) svd_result=svd(apply(X,2,function(x){x-mean(x)}))

Re: [R] Urgent help requested to modify a script

2009-10-19 Thread one2luv
Jim, Many thanks last part of the puzzle is now solved. I have reworked the script and now it runs with 4 arguments. Thanks for your help. Regards, Ian Jim Lemon-2 wrote: On 10/16/2009 11:01 PM, one2luv wrote: I am hoping someone will tak up this chalenge (I am new to R) I have

Re: [R] : Question about correlation between data.

2009-10-19 Thread Lucky Strike
Lucky Strike wrote: hi everybody, I'm a student, and I'm new using R! I'm looking for statistical help hoping somebody can answer me! This is my problem: I have 2 temporal series. The firstone is a series of mesured data (height of monitorated points), the second is a series

Re: [R] R help - IGARCH estimation

2009-10-19 Thread Xu, Ke-Li
Hi there, Thanks for your previous help on R. Do you know how to estimate an IGARCH (integrated GARCH) model in R? I need it when I estimate the Value at Risk following RiskMetrics methodology. regards, Keli -Original Message- From: Gustaf Rydevik [mailto:gustaf.ryde...@gmail.com]

[R] Variant of cloud with sticks from points to surface

2009-10-19 Thread PerfectTiling
Hi, I'd like to (1) plot a perspective view of a 3D scatterplot, with a fitted (curved) surface; (2) have a stick from each point vertically to the surface. The latter helps one visualize where a point lies in 3D, relative to the surface. Is there a variant of the cloud function (lattice

Re: [R] Variant of cloud with sticks from points to surface

2009-10-19 Thread Dieter Menne
PerfectTiling wrote: (1) plot a perspective view of a 3D scatterplot, with a fitted (curved) surface; (2) have a stick from each point vertically to the surface. The latter helps one visualize where a point lies in 3D, relative to the surface. Is there a variant of the cloud

Re: [R] R help - IGARCH estimation

2009-10-19 Thread Gustaf Rydevik
On Mon, Oct 19, 2009 at 6:37 AM, Xu, Ke-Li k...@bus.ualberta.ca wrote: Hi there, Thanks for your previous help on R. Do you know how to estimate an IGARCH (integrated GARCH) model in R? I need it when I estimate the Value at Risk following RiskMetrics methodology. regards, Keli Hi

Re: [R] What is the difference between prcomp and princomp?

2009-10-19 Thread Mark Difford
Peng Yu wrote: Some webpage has described prcomp and princomp, but I am still not quite sure what the major difference between them is. The main difference, which could be extracted from the information given in the help files, is that prcomp uses the singular value decomposition [i.e. does

[R] Possible bug in plot.POSIXct regarding x axis

2009-10-19 Thread Karl Ove Hufthammer
I believe I have found a bug (or at least a misfeature) in plot.POSIXct. See the following example code. set.seed(1) x=seq(1,1e8,length=100)+round(runif(100)*1e8) y=as.POSIXct(x,origin=2001-01-01) plot(y) This plots some random (date)times against their indices. The y axis correctly shows

Re: [R] loop and plot

2009-10-19 Thread Rene
Dear all, I am stuck at applying loop function for creating separated plots. I have coding like below: dataset.table - table(data.frame(var1=c(1,2,3,1,2,3,1),colour=c(a,b,c,c,a,b,b) )) kk = function(f) { ls=as.character(f) pie(dataset.table[ls,],main=ls)

Re: [R] package installation from source

2009-10-19 Thread Duncan Murdoch
Petr PIKAL wrote: Hi Duncan Murdoch murd...@stats.uwo.ca napsal dne 16.10.2009 17:01:59: On 10/16/2009 9:31 AM, Petr PIKAL wrote: Dear all I noticed from NEWS 2.11.0,dev SIGNIFICANT USER-VISIBLE CHANGES o Packages must have been installed under R 2.10.0 or later, as

Re: [R] loop and plot

2009-10-19 Thread joris meys
Hi Rene, the problem is probably due to the fact that R will send all plots to the same graphical output window. Each next plot just replaces the previous one. if it's only a few plots, you can divide the graphical window with the commands par(mfrow=...) (see ?par) or layout(matrix(...)) (see

Re: [R] Variant of cloud with sticks from points to surface

2009-10-19 Thread Barry Rowlingson
On Mon, Oct 19, 2009 at 5:26 AM, PerfectTiling perfecttil...@yahoo.com wrote: Hi, I'd like to  (1) plot a perspective view of a 3D scatterplot, with a fitted (curved) surface;  (2) have a stick from each point vertically to the surface. The latter helps one visualize where a point lies

[R] Pausing R

2009-10-19 Thread Anders Carlsson
Hello, I’m currently running a script that takes several days to complete, and have therefore chosen to start two instances of R, each doing half the work (since I have a two-processor machine). The problem is that this renders my computer worthless to do other work on. So - is it possible to

Re: [R] loop and plot

2009-10-19 Thread joris meys
Hi Rene, two reasons : - you have to specify the par first in your function, before plotting. - you say for (i in length(f)), but length(f) is a vector with only one value. The correct syntax is : kk = function(f) { par(mfrow=c(1,length(f)))

Re: [R] loop and plot

2009-10-19 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Or you open a new graphics window / device as part of the loop, see, e.g., ?windows. Alternatively, you may write the content of the graphics device to a file for each iteration, see, e.g., ?savePlot (but you'd want to make sure that you have a different filename in each iteration, otherwise,

Re: [R] package installation from source

2009-10-19 Thread Duncan Murdoch
On 10/19/2009 7:59 AM, Petr PIKAL wrote: Hi r-help-boun...@r-project.org napsal dne 19.10.2009 12:24:47: Petr PIKAL wrote: Hi Duncan Murdoch murd...@stats.uwo.ca napsal dne 16.10.2009 17:01:59: On 10/16/2009 9:31 AM, Petr PIKAL wrote: Dear all I noticed from NEWS 2.11.0,dev

Re: [R] Pausing R

2009-10-19 Thread Duncan Murdoch
On 10/19/2009 7:45 AM, Anders Carlsson wrote: Hello, I’m currently running a script that takes several days to complete, and have therefore chosen to start two instances of R, each doing half the work (since I have a two-processor machine). The problem is that this renders my computer

Re: [R] Why points() is defined specially for a 1 by 2 matrix?

2009-10-19 Thread hadley wickham
 To answer one of your other questions: ggplot (and lattice) is/are very powerful, but base graphics are (a) easier to get your head around and (b) easier to adjust if you don't like the defaults.  Changing things just a little bit in ggplot can be difficult (as an example, the answer to your

Re: [R] Pausing R

2009-10-19 Thread Peter Dalgaard
Anders Carlsson wrote: Hello, I’m currently running a script that takes several days to complete, and have therefore chosen to start two instances of R, each doing half the work (since I have a two-processor machine). The problem is that this renders my computer worthless to do other work on.

[R] access elements of summary.aov?

2009-10-19 Thread Liviu Andronic
Dear all How do I access individual elements of a summary.aov object? data(iris) AnovaModel.1 - aov(Sepal.Length ~ Species, data=iris) tmp - summary(AnovaModel.1) tmp Df Sum Sq Mean Sq F value Pr(F) Species 2 63.231.6 119 2e-16 *** Residuals 147 39.0 0.3

Re: [R] Pausing R

2009-10-19 Thread Anders Carlsson
Peter Dalgaard wrote: Anders Carlsson wrote: Hello, I’m currently running a script that takes several days to complete, and have therefore chosen to start two instances of R, each doing half the work (since I have a two-processor machine). The problem is that this renders my computer

[R] How do I wrap a long mixed text/math expression in an axis label?

2009-10-19 Thread Cheryl Squair
I would like to wrap a y-axis label onto two lines. My label is an expression containing both text and math symbols. I have looked at plotmath, strsplit(), strwrap(), deparse(), do.call(), substitute() and bquote(). Based on previous posts, I can get plain text to wrap. However, when I try these

[R] [R-pkgs] Updates to tmvtnorm package

2009-10-19 Thread Stefan Wilhelm
Dear R users, the tmvtnorm package, the package for the truncated multivariate normal distribution, has been updated on CRAN. The major changes in version 0.8 are: * Reimplemented the Gibbs' sampler for random number generation in Fortran for performance reasons. This compiled code is now even

[R] useR! 2010: submission registration started!

2009-10-19 Thread Katharine Mullen
We are happy to inform you that abstract submission and registration for `useR! 2010' is now available online from http://www.R-project.org/useR-2010/ This meeting of the R user community will take place at the Gaithersburg, Maryland, USA campus of the National Institute of Standards and

[R] How to import the large data into R

2009-10-19 Thread Jun Chen
Dear, I would like to deal with microarray data, it can run when i deal with little data. However, the amount number of SNP data are 45181, amount numbers of animal are 3081,it can not be allocated 1000Mb memory when i importing them to R Procedure sentence show:

Re: [R] loop and plot

2009-10-19 Thread Johannes Graumann
Rene wrote: Dear all, I am stuck at applying loop function for creating separated plots. I have coding like below: dataset.table - table(data.frame(var1=c(1,2,3,1,2,3,1),colour=c(a,b,c,c,a,b,b) )) kk = function(f) { ls=as.character(f)

[R] Import SPSS file to R

2009-10-19 Thread Suman Kundu
Hello,   In R, How to read SPSS file and access the data item? Thank you. Regards, Suman Kundu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Pausing R

2009-10-19 Thread Rainer M Krug
On Mon, Oct 19, 2009 at 2:40 PM, Anders Carlsson anders.carls...@immun.lth.se wrote: Peter Dalgaard wrote: Anders Carlsson wrote: Hello, I’m currently running a script that takes several days to complete, and have therefore chosen to start two instances of R, each doing half the work

Re: [R] access elements of summary.aov?

2009-10-19 Thread Prof Brian Ripley
It is a 'List of 1', so you want tmp[[1]] which you can access as a data frame. As the help file says For a fit with a single stratum the result will be a list of ANOVA tables, one for each response (even if there is only one response): the tables are of class 'anova' inheriting

Re: [R] Pausing R

2009-10-19 Thread Karl Ove Hufthammer
In article fb7c7e870910190551i5fb96074t76f2c800e3e5cf33 @mail.gmail.com, r.m.k...@gmail.com says... I am not - I am using Linux. Just for interests sake: how can I pause a task in Linux? If you start the application using the command line, just press 'Ctrl + Z' to pause/suspend it. Then type

Re: [R] How do I wrap a long mixed text/math expression in an axis label?

2009-10-19 Thread Duncan Murdoch
On 10/19/2009 5:28 AM, Cheryl Squair wrote: I would like to wrap a y-axis label onto two lines. My label is an expression containing both text and math symbols. I have looked at plotmath, strsplit(), strwrap(), deparse(), do.call(), substitute() and bquote(). Based on previous posts, I can get

Re: [R] Filtering on a dataframe- newbie question

2009-10-19 Thread ANJAN PURKAYASTHA
Thank you all who replied to my post. That cleared things up very well Anjan On Sun, Oct 18, 2009 at 11:10 PM, ANJAN PURKAYASTHA anjan.purkayas...@gmail.com wrote: Hi, newbie question. I have a data-frame with 3 named columns: Name, Obs1, Obs2. The Name column members are made of

[R] Spatstat: xy binary data into mask type to use in owin(mask=)

2009-10-19 Thread Javier PB
Dear users, I am trying to export polygons from Arcmap into Spatstat to run some simulations using functions available in Spatstat package. One particular area to be exported is formed by a number of polygons defining the external boundaries of the area (as a groups of islands) and a number of

Re: [R] Import SPSS file to R

2009-10-19 Thread Chuck Cleland
On 10/19/2009 8:06 AM, Suman Kundu wrote: Hello, In R, How to read SPSS file and access the data item? RSiteSearch('SPSS', restrict='function') Thank you. Regards, Suman Kundu [[alternative HTML version deleted]]

Re: [R] Import SPSS file to R

2009-10-19 Thread Jorge Ivan Velez
Hi Suman, See the read.spss function in the foreign package, e.g.: # install.packages(foreign) require(foreign) ?read.spss HTH, Jorge On Mon, Oct 19, 2009 at 8:06 AM, Suman Kundu wrote: Hello, In R, How to read SPSS file and access the data item? Thank you. Regards, Suman Kundu

Re: [R] How to create MULTILEVELS in a dataset??

2009-10-19 Thread Ista Zahn
HI, Please keep r-help copied on the reply -- hopefully someone will pick up this thread and help us out. On Mon, Oct 19, 2009 at 2:17 AM, saurav pathak pathak.sau...@gmail.com wrote: Dear Ista Thanks for answering, the previous question was a primer to what I wanted, I did just what you said

[R] Defining S3-methods for S4-objects: cannot coerce type 'S4' to vector of type 'integer'

2009-10-19 Thread Søren Højsgaard
In the 'doBy' package there is an esticon() function for calculating linear contrasts for various model types. I have defined an S3-method 'esticon.mer()' for 'mer' objects from the lme4 package. Building the package and invoking the method gives: esticon(fm1, c(1,1)) Confidence interval (

Re: [R] Pausing R

2009-10-19 Thread Rainer M Krug
On Mon, Oct 19, 2009 at 3:01 PM, Karl Ove Hufthammer k...@huftis.org wrote: In article fb7c7e870910190551i5fb96074t76f2c800e3e5cf33 @mail.gmail.com, r.m.k...@gmail.com says... I am not - I am using Linux. Just for interests sake: how can I pause a task in Linux? If you start the application

Re: [R] package installation from source

2009-10-19 Thread Petr PIKAL
Hi Up! I finally get it work. For the record: 1. problem - spaces in path definition 2. problem - customised Rprofile.site which throws error when trying to load some packages After starting with all customised values disabled R CMD INSTALL worked as charm. Thank you very much, it

Re: [R] Pausing R

2009-10-19 Thread Barry Rowlingson
On Mon, Oct 19, 2009 at 2:01 PM, Karl Ove Hufthammer k...@huftis.org wrote: If you start the application using the command line, just press 'Ctrl + Z' to pause/suspend it. Then type 'fg' when you want to resume it. If you can't get to the command line where you started R, then you can send

Re: [R] access elements of summary.aov?

2009-10-19 Thread Liviu Andronic
On 10/19/09, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: It is a 'List of 1', so you want tmp[[1]] which you can access as a data frame. As the help file says Thank you. I forgot how to access elements of lists. Regards Liviu __

Re: [R] modifying model coefficients

2009-10-19 Thread Chuck Cleland
On 10/18/2009 11:26 PM, tdm wrote: I have build a model but want to then manipulate the coefficients in some way. I can extract the coefficients and do the changes I need, but how do I then put these new coefficients back in the model so I can use the predict function? my_model - lm(x ~

[R] Time forecasting next step.

2009-10-19 Thread rkevinburton
This is kind of a general question about methodology more than anything. But I was looking for fome advice. I have fit a time-series model and feel pretty confident that I have taken this model (exponential smoothing) as far as it will go. In other words looking at the data and the fitted

Re: [R] Pausing R

2009-10-19 Thread Rainer M Krug
On Mon, Oct 19, 2009 at 3:21 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Mon, Oct 19, 2009 at 2:01 PM, Karl Ove Hufthammer k...@huftis.org wrote: If you start the application using the command line, just press 'Ctrl + Z' to pause/suspend it. Then type 'fg' when you want to

[R] Convert data frame entries to numbers

2009-10-19 Thread John
Hello, I figure this is quite a simple problem really, but since I'm quite new to R I need to ask: If I have a data frame: str(test) : $ classcol: Factor w/ 3 levels 1,2,3 How do I convert the entries in this column to numbers. I.e., I want to be abl to do simple calculations like

[R] lmer family=binomal p-values

2009-10-19 Thread Krystyna Golabek
Hi, If any one has time I need some help understanding the P-values given in the lmer output. Using AIC for model selection I find my minimal model is FOLLOW~MOVERSTATUS+DISTANCE however it appears DISTANCE is not significant at 95% confidence, see output quoted below. However, removing

Re: [R] Convert data frame entries to numbers

2009-10-19 Thread joris meys
2 problems : test seems to be a data frame or list with one variable. So you have to specify : as.numeric(test$classcol) But this will make the internal factor levels the real values, not the numbers you specified. What you need, is as.numeric(as.character(test$classcol)) Cheers Joris On Mon,

[R] how to get rid of 2 for-loops and optimize runtime

2009-10-19 Thread Ian Willems
Short: get rid of the loops I use and optimize runtime Dear all, I want to calculate for each row the amount of the month ago. I use a matrix with 2100 rows and 22 colums (which is still a very small matrix. nrows of other matrixes can easily be more then 10) Table before Year month

Re: [R] Convert data frame entries to numbers

2009-10-19 Thread Peter Ehlers
joris meys wrote: 2 problems : test seems to be a data frame or list with one variable. So you have to specify : as.numeric(test$classcol) But this will make the internal factor levels the real values, not the numbers you specified. What you need, is as.numeric(as.character(test$classcol))

Re: [R] how to get rid of 2 for-loops and optimize runtime

2009-10-19 Thread joris meys
Hi Ian, first of all, take a look at the functions sapply, mapply, lapply, tapply, ... : they are the more efficient way of implementing loops. Second, could you elaborate a bit further on the data set : the amount of the month ago, is that one value from another row, or the sum of all values in

[R] How to get slope estimates from a four parameter logistic with SSfpl?

2009-10-19 Thread Weber, Sam
Hi, I was hoping to get some advice on how to derive estimates of slopes from four parameter logistic models fit with SSfpl. I fit the model using: model-nls(temp~SSfpl(time,a,b,c,d)) summary(model) I am interested in the values of the lower and upper asymptotes (parameters a and b), but

Re: [R] Pausing R

2009-10-19 Thread Karl Ove Hufthammer
In article d8ad40b50910190621t6389411bq9953a271f3ec8...@mail.gmail.com, b.rowling...@lancaster.ac.uk says... If you can't get to the command line where you started R, then you can send the process the 'STOP' and 'CONT' signals using the 'kill' command. You need to get the process ID (see man

Re: [R] What is the difference between prcomp and princomp?

2009-10-19 Thread Peng Yu
On Mon, Oct 19, 2009 at 5:02 AM, Mark Difford mark_diff...@yahoo.co.uk wrote: Peng Yu wrote: Some webpage has described prcomp and princomp, but I am still not quite sure what the major difference between them is. The main difference, which could be extracted from the information given in

Re: [R] What an element in loading is missing? (princomp)

2009-10-19 Thread Peng Yu
On Mon, Oct 19, 2009 at 1:58 AM, Peter Ehlers ehl...@ucalgary.ca wrote: Peng Yu wrote: Please see below that [3,1] of loadings is not printed. I am wondering what the problem is? Not trying ?loadings, perhaps?? 'loadings' gives me the same thing. pca_result$loadings Loadings:

Re: [R] What an element in loading is missing? (princomp)

2009-10-19 Thread Andris Jankevics
Hi, ?loadings print (pca_result$loadings,cutoff=0) unclass(pca_result$loadings) -- Andris Jankevics AIO Groningen Bioinformatics Centre Groningen Biomolecular Sciences and Biotechnology Institute University of Groningen Kerklaan 30, Haren, 9751 NN, The Netherlands On Mon, Oct 19, 2009 at 4:34

Re: [R] lmer family=binomal p-values

2009-10-19 Thread Dieter Menne
Krystyna Golabek wrote: Using AIC for model selection I find my minimal model is FOLLOW~MOVERSTATUS+DISTANCE however it appears DISTANCE is not significant at 95% confidence, see output quoted below. However, removing DISTANCE gives a higher AIC=433.5, therefore I will keep it in, but

Re: [R] How to import the large data into R

2009-10-19 Thread tlumley
On Mon, 19 Oct 2009, Jun Chen wrote: Dear, I would like to deal with microarray data, it can run when i deal with little data. However, the amount number of SNP data are 45181, amount numbers of animal are 3081,it can not be allocated 1000Mb memory when i importing them to R Procedure sentence

Re: [R] Defining S3-methods for S4-objects: cannot coerce type 'S4' to vector of type 'integer'

2009-10-19 Thread Martin Morgan
Søren Højsgaard wrote: In the 'doBy' package there is an esticon() function for calculating linear contrasts for various model types. I have defined an S3-method 'esticon.mer()' for 'mer' objects from the lme4 package. Building the package and invoking the method gives: esticon(fm1,

Re: [R] Import SPSS file to R

2009-10-19 Thread Orvalho Augusto
Or even install.packages(Hmisc) library(Hmisc) then use spss.get Actually spss.get uses read.spss from foreign package but with common default options. Caveman On Mon, Oct 19, 2009 at 3:18 PM, Jorge Ivan Velez jorgeivanve...@gmail.com wrote: Hi Suman, See the read.spss function in the

[R] population variance and sample variance

2009-10-19 Thread Peng Yu
It seems that var() computes sample variance. It is straight forward to compute population variance from sample variance. However, I feel that it is still convenient to have a function that can compute population variance. Is there a population variance function available in R? $ Rscript var.R

Re: [R] How to create MULTILEVELS in a dataset??

2009-10-19 Thread saurav pathak
Hi Ista You got that correct, yearctry is a composite created as yearctry = year*1+country, so that say for example USA with country code 1 and year 2000 will be 201, for year 2005, it will be 2005001, the years are listed from 2000 to 2008, for many countries, for UK say it will be

[R] (no subject)

2009-10-19 Thread Reynaerts, Jo
Dear R users I have the following problem when calling optim() to minimize a function f.obj (= outer loop) that calls another function f.con (a contraction mapping, = inner loop). It seems to me that it is a numerical problem that I currently fail to take into account when coding. Calling

[R] updating columns using other column as reference

2009-10-19 Thread milton ruser
Dear R-gurus, Just supose I have a dara.frame that looks like myDF-read.table(stdin(),head=T,sep=,) codID,namesp,k1,k2,k3,k4 1,spA,2,5,6,3 2,spB,4,5,4,6 3,spC,2,1,5,6 4,spC,5,4,3,2 5,spD,1,2,3,4 6,spE,2,4,3,1 I need to update the columns k1-k4 with the namesp, but considering the math between

Re: [R] how to get rid of 2 for-loops and optimize runtime

2009-10-19 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ian Willems Sent: Monday, October 19, 2009 6:50 AM To: 'r-help@r-project.org' Subject: [R] how to get rid of 2 for-loops and optimize runtime Short: get rid of the loops I

Re: [R] How to create MULTILEVELS in a dataset??

2009-10-19 Thread Ista Zahn
Hi, I wouldn't combine the year and country codes in the first place, and certainly not as a numeric value. Do you have the raw data with country and year listed separately? From the output you listed it looks like you indeed have a single value (2e+07) for yearctry. You can check with

[R] Problem with geometry manager in TclTK

2009-10-19 Thread Gabriel Margarido
Hello, everyone. I have the following problem with TclTk: I create some windows and want to change their position with geometry manage (sometimes they will be centered, sometimes not). If the toplevel is created and its dimensions are gathered via 'tkwinfo', I get (usually) correct values.

Re: [R] updating columns using other column as reference

2009-10-19 Thread Henrique Dallazuanna
Milton, Try this: myDF[grep(k, names(myDF))] - sapply(myDF[grep(k, names(myDF))], function(idx)myDF$namesp[idx]) On Mon, Oct 19, 2009 at 2:03 PM, milton ruser milton.ru...@gmail.com wrote: Dear R-gurus, Just supose I have a dara.frame that looks like myDF-read.table(stdin(),head=T,sep=,)

[R] Spline

2009-10-19 Thread Ashta
Hi All, I am using R version 2.9.2 (2009-08-24) window version and I wanted to use the library(spline) Error in library(spline) : there is no package called 'spline' I tried to install packages as well and it is not there either. Am I missing something there. Where can I get this library?

Re: [R] Problem with geometry manager in TclTK

2009-10-19 Thread Peter Dalgaard
Gabriel Margarido wrote: Hello, everyone. I have the following problem with TclTk: I create some windows and want to change their position with geometry manage (sometimes they will be centered, sometimes not). If the toplevel is created and its dimensions are gathered via 'tkwinfo', I get

Re: [R] Spline

2009-10-19 Thread Simon Bonner
Hey Ashta, Simply typo, it's splines... library(splines). Cheers... - Simon Bonner Post-Doctoral Fellow Department of Statistics, UBC www.simon.bonners.ca On Mon, 2009-10-19 at 12:59 -0400, Ashta wrote: Hi All, I am using R version 2.9.2 (2009-08-24) window version and I wanted to use

Re: [R] updating columns using other column as reference

2009-10-19 Thread milton ruser
Amazing. Thanks a lot milton On Mon, Oct 19, 2009 at 12:55 PM, Henrique Dallazuanna www...@gmail.comwrote: Milton, Try this: myDF[grep(k, names(myDF))] - sapply(myDF[grep(k, names(myDF))], function(idx)myDF$namesp[idx]) On Mon, Oct 19, 2009 at 2:03 PM, milton ruser

Re: [R] How to get slope estimates from a four parameter logistic with SSfpl?

2009-10-19 Thread Peter Ehlers
Weber, Sam wrote: Hi, I was hoping to get some advice on how to derive estimates of slopes from four parameter logistic models fit with SSfpl. I fit the model using: model-nls(temp~SSfpl(time,a,b,c,d)) summary(model) I am interested in the values of the lower and upper asymptotes

[R] Time Series Data

2009-10-19 Thread Marlin Keith Cox
Hi all and thanks in advance. I am regressing Time and Weight, and then predicting Weight at different Time. The format of the Time data is day/month/year. How can I get R to use time series data such as this? Keith -- M. Keith Cox, Ph.D. Alaska NOAA Fisheries, National Marine Fisheries

Re: [R] What an element in loading is missing? (princomp)

2009-10-19 Thread Peter Ehlers
You misunderstood my comment; perhaps I was too cryptic. I intended you to look up help(loadings) where the argument cutoff is pretty clearly indicated to default to 0.1. -Peter Ehlers Peng Yu wrote: On Mon, Oct 19, 2009 at 1:58 AM, Peter Ehlers ehl...@ucalgary.ca wrote: Peng Yu wrote:

[R] Sweave file generation

2009-10-19 Thread Gabriel Koutilellis
Dear list,I have read really a lot the past few days, but I haven't found a matching solution for my problem.I have R 2.9.2 on Windows XP and MikTex 2.8 installed.What I want to do is to automate the sweave file generation.I thought I could use the R2Sweave, RweaveLatex, and Sweave in a

Re: [R] Variant of cloud with sticks from points to surface

2009-10-19 Thread Rolf Turner
On 19/10/2009, at 5:26 PM, PerfectTiling wrote: Hi, I'd like to (1) plot a perspective view of a 3D scatterplot, with a fitted (curved) surface; (2) have a stick from each point vertically to the surface. The latter helps one visualize where a point lies in 3D, relative to the

Re: [R] population variance and sample variance

2009-10-19 Thread Kingsford Jones
sum((x-mean(x))^2)/(n) [1] 0.4894708 ((n-1)/n) * var(x) [1] 0.4894708 hth, Kingsford On Mon, Oct 19, 2009 at 9:30 AM, Peng Yu pengyu...@gmail.com wrote: It seems that var() computes sample variance. It is straight forward to compute population variance from sample variance. However, I feel

[R] Reposting various problems with two-way anova, lme, etc.

2009-10-19 Thread Michael Schacht Hansen
Hi, I posted the message below last week, but no answers, so I'm giving it another attempt in case somebody who would be able to help might have missed it and it has now dropped off the end of the list of mails. I am fairly new to R and still trying to figure out how it all works, and I have run

Re: [R] rbind to array members

2009-10-19 Thread Another Oneforyou
4adbca02.8020...@temple.edu Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 =20 library(abind) ## array binding I've looked into using abind()=2C but it seems I might not understand it pr= operly. I can build my 2 table array=2C

Re: [R] rbind to array members

2009-10-19 Thread Tony Plate
Unfortunately, I can't read your examples. Can you repost without the formatting characters which are confusing when rendered in plain text? One thing to keep in mind is that a R array is a regular object -- e.g., if you have a 2 x 3 x 4 array, then if you want to add a row to a slice, you

Re: [R] Fitting a quasipoisson distribution to univariate data

2009-10-19 Thread Brian Cady
Nigel Harding wrote: Dear all, I am analyzing counts of seabirds made from line transects at sea. ... is there some easier way to fit a quasipoisson distribution? R commander seems to be a relatively easy-to-use front end/GUI for R, to this statistics and computing novice. I start

[R] Standalone RMath.h in C

2009-10-19 Thread RwithC
Hi I want to use standalone Rmath.h in C, but I am getting the following error: /.../include/R_ext/Boolean.h:29: error: conflicting declaration 'FALSE' /.../include/Rmath.h:191: error: 'FALSE' has a previous declaration as 'Rboolean FALSE' /.../include/R_ext/Boolean.h:29: error: conflicting

Re: [R] How to import the large data into R

2009-10-19 Thread Jun Chen
yes, it's in windows, you are so serious, Thanks so much, give me very good suggestion, i will try it. Thanks again. Best regards jun chen On Mon, Oct 19, 2009 at 5:04 PM, tlum...@u.washington.edu wrote: On Mon, 19 Oct 2009, Jun Chen wrote: Dear, I would like to deal with microarray data, it

Re: [R] rbind to array members‏

2009-10-19 Thread RICHARD M. HEIBERGER
       z - abind(x[,,1], c(4,5,6),along=0) z is probably not what you want because you aren't using the drop=FALSE argument. See the FAQ 7.5 abind, and arrays in general, are rectangular solids. They are not ragged. For that you need lists. To get something like your request x , , 1    

Re: [R] What an element in loading is missing? (princomp)

2009-10-19 Thread Kingsford Jones
Peng, It's generally useful to know the class of the object you are working with, and the methods available for that class. This would have led you to the 'loadings' help page. class(pca_result$loadings) [1] loadings methods(class='loadings') [1] print.loadings* Non-visible functions are

Re: [R] Time Series Data

2009-10-19 Thread stephen sefick
jullian day? On Mon, Oct 19, 2009 at 1:20 PM, Marlin Keith Cox marlink...@gmail.com wrote: Hi all and thanks in advance. I am regressing Time and Weight, and then predicting Weight at different Time.  The format of the Time data is day/month/year.  How can I get R to use time series data

Re: [R] what's the R code for wavelet decomposition (Haar transformation)?

2009-10-19 Thread stephen sefick
What package are you using? There are quite a few functions that do wavelet decomposition. Have you tried an R site search? Stephen On Fri, Oct 16, 2009 at 3:43 PM, Zhen Li z...@bios.unc.edu wrote: Dear all, Using R function dwt, it seems that I cannot specify the wavelet transformation

[R] Random Forest - partial dependence plot

2009-10-19 Thread Carlos M. Zambrana-Torrelio
Hi everybody, I used random forest regression to explain the patterns of species richness and a bunch of climate variables (e.g. Temperature, precipitation, etc.) All are continuos variables. My results are really interesting and my model explained 96,7% of the variance. Now I am trying to take

Re: [R] Spatstat: xy binary data into mask type to use in owin(mask=)

2009-10-19 Thread Rolf Turner
In the first instance, questions about contributed packages should be addressed to the package maintainers rather than to the R-help list. On 20/10/2009, at 2:06 AM, Javier PB wrote: Dear users, I am trying to export polygons from Arcmap into Spatstat to run some simulations using functions

[R] Using grep to determine value of last letter...

2009-10-19 Thread Jason Rupert
I am currently being defeated by grep. I am attempting to determine the value of the last letter of a character string. An example of my data set is shown below. Regarding the codes, I would like to identify the value of the last character and then take the appropriate action, e.g. If the

Re: [R] Sweave file generation

2009-10-19 Thread Ista Zahn
I'm not sure I understand. Why not just take your existing R script and wrap it in \begin{document} = ... @ \end{document} and run it through Sweave? -Ista On Mon, Oct 19, 2009 at 2:40 PM, Gabriel Koutilellis kgabr...@in.com wrote: Dear list,I have read really a lot the past few days, but I

Re: [R] modifying model coefficients

2009-10-19 Thread tdm
Thanks for the tip. I actually had to learn a bit of matrix multiplication and ended up calculating the RMSE this way. scores_lr - t(coeffs_alldata) %*% t(df_train) rmseTrain - (mean(((scores_lr)- trainY)^2))^0.5 full script and results here if you are interested.

Re: [R] Sweave file generation

2009-10-19 Thread Gabriel Koutilellis
here is a simple scriptx texi2dvi(script.tex, pdf=T)would produce of something like the pdf with the summaries and plots coded inside the script.RThank you [[alternative HTML version deleted]] rh...@rproject.org mailing list https://stat.ethz.ch/mailman/listinfo/rhelp PLEASE do read

Re: [R] Using grep to determine value of last letter...

2009-10-19 Thread Bert Gunter
Well, regexpr() can do it; the magical incantation is regexpr(.$,yourstring) See ?regexpr for details. However, as your task really doesn't involve MATCHING characters, but COUNTING characters, it might be simpler to use nchar() and substr(): n - nchar(yourstring) lastLetter -

Re: [R] Using grep to determine value of last letter...

2009-10-19 Thread Gabor Grothendieck
Here are several ways to find the last character in a string: x - abc substring(x, nchar(x)) [1] c sub(.*(.), \\1, x) [1] c library(gsubfn) strapply(x, .$)[[1]] [1] c On Mon, Oct 19, 2009 at 3:52 PM, Jason Rupert jasonkrup...@yahoo.com wrote: I am currently being defeated by grep.  I am

  1   2   >