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

2009-10-19 Thread Karl Ove Hufthammer
In article <80b45a8c0910192051nd558023p9b76566464fc3...@mail.gmail.com>, remkoduur...@gmail.com says... > I think it is a bug. Apparently plot.POSIXct calls axis.POSIXct for > both y (correct) and x (incorrect) axes: Thanks. Reported as bug #14016. -- Karl Ove Hufthammer __

[R] Best SVM Performance measure?

2009-10-19 Thread Noah Silverman
Hi, This is probably going to be one of those, "It depends what you want" kind of answers, but I'm very curious to see if the group has an opinion or some general suggestions. The actual experiment is too complicated for a quick e-mail, but I'll summarize well enough(hopefully) to get the co

Re: [R] Weighted Logistic Regressions using svyglm

2009-10-19 Thread Peter Ehlers
Fulton wrote: I’m running some logistic regressions and I’ve been trying to include weights in the equation. However, when I run the model, I get this warning message: Here’s what it says: Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! I think it

[R] Weighted Logistic Regressions using svyglm

2009-10-19 Thread Fulton
I’m running some logistic regressions and I’ve been trying to include weights in the equation. However, when I run the model, I get this warning message: Here’s what it says: Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! I think it is because the w

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

2009-10-19 Thread Remko Duursma
I think it is a bug. Apparently plot.POSIXct calls axis.POSIXct for both y (correct) and x (incorrect) axes: set.seed(1) x=seq(1,1e8,length=100)+round(runif(100)*1e8) y=as.POSIXct(x,origin="2001-01-01") plot(y, axes=FALSE) axis.POSIXct(2, y) axis.POSIXct(1,y) # is what it does axis(1, col="red")

Re: [R] lattice xyplot strip colors and location

2009-10-19 Thread ShankarAjay
Hi Duncan, Thanks for your response and I'm sorry for the delayed reply - think my spam filter is to blame. Your solution did work. Thanks a ton! Shankar Duncan Mackay-2 wrote: > > Hi Shankar > > On a slightly different note - below produces a strip to the left without > the stacked strip

Re: [R] plotting labels (not values) on xy plot

2009-10-19 Thread tdm
Thanks Jim - that worked. Jim Lemon-2 wrote: > > On 10/20/2009 01:10 PM, tdm wrote: >> I have 2 vectors, x and y and have done an xy plot. >> >> I want to plot the label (name?) of the vector on the plot rather than >> the >> value. >> >> text(x,y, labels = x) >> >> gives me the value of x. >>

Re: [R] plotting labels (not values) on xy plot

2009-10-19 Thread Jim Lemon
On 10/20/2009 01:10 PM, tdm wrote: I have 2 vectors, x and y and have done an xy plot. I want to plot the label (name?) of the vector on the plot rather than the value. text(x,y, labels = x) gives me the value of x. text(x,y, labels = labels(x)) gives me something like c("text1","text2"..) p

[R] embedding R CMD BATCH in a unix shell script

2009-10-19 Thread Tena Sakai
Hi folks, I have a one line shell script which looks like this: R CMD BATCH --no-restore --no-save foo.R It executes the R program in foo.R and generates output called foo.Rout. Is there any way that I can force the output to come to stdout and stderr (instead of foo.Rout)? What I really wan

[R] plotting labels (not values) on xy plot

2009-10-19 Thread tdm
I have 2 vectors, x and y and have done an xy plot. I want to plot the label (name?) of the vector on the plot rather than the value. text(x,y, labels = x) gives me the value of x. text(x,y, labels = labels(x)) gives me something like c("text1","text2"..) plotted for each point text(x,y, la

[R] Is there a way to specify drop=FALSE as the global default?

2009-10-19 Thread Peng Yu
tmp <- matrix(1:2) tmp tmp[,1,drop=FALSE] See the above example. Is there a way to make 'drop=FALSE' as global default, so that when I say 'tmp[,1]', R will treat it as 'tmp[,1,drop=FALSE]'? __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] Copulas

2009-10-19 Thread emkayenne
Hello! I am currently using R to deal empirically with copulas. I am using financial return data to construct copula models that seem appropriate for my data sets. Is there anyone who has done something similar and who is interested in talking (or writing...) with me about this topic (difficultie

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

2009-10-19 Thread Peng Yu
On Mon, Oct 19, 2009 at 9:31 AM, Peng Yu wrote: > On Mon, Oct 19, 2009 at 5:02 AM, Mark Difford > 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 cou

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

2009-10-19 Thread Zhen Li
Thanks so much, Chris! I only found Haar transformation from "filter.select". The manual I found on "wd" doesn't include Haar in the "family" specification. Essentially I want a code which can return approximation coefficients and detail coefficients. There might be other code in "wavethresh" I

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

2009-10-19 Thread Chris Friedl
The wavethresh package on CRAN has Haar wavelets. Zhen Li wrote: > > Dear all, > > Using R function "dwt", it seems that I cannot specify the wavelet > transformation like Haar. What's the R code for wavelet decomposition > which allows me to specify Haar wavelet transformation? Of course, i

Re: [R] overloading base function

2009-10-19 Thread Gabor Grothendieck
Perhaps you could just call it Det. On Mon, Oct 19, 2009 at 7:16 PM, David van Leeuwen wrote: > Hello, > > I am trying to write an R package for doing analysis of speaker > recognition systems.  The big thing in this line of research is a > DET-plot (detection Error Trade-off, a ROC plot with qno

[R] overloading base function

2009-10-19 Thread David van Leeuwen
Hello, I am trying to write an R package for doing analysis of speaker recognition systems. The big thing in this line of research is a DET-plot (detection Error Trade-off, a ROC plot with qnorm() warped axes). My approach has been to make a class "det" and also a function "det()" that will pre

Re: [R] Singular Gradient Test

2009-10-19 Thread Sarah Goslee
You could look into try(). Sarah On Mon, Oct 19, 2009 at 5:49 PM, Douglas M. Hultstrand wrote: > Hello, > > I posted this question last week and have not heard anything, I am wondering > if anyone had ideas for testing a model relationship? > > I am working with a real-time hydrologic modeling s

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

2009-10-19 Thread Albyn Jones
There is a dwt() in package:waveslim, reading the help file: dwt(x, wf="la8", n.levels=4, boundary="periodic") wf: Name of the wavelet filter to use in the decomposition. By default this is set to '"la8"', the Daubechies orthonormal compactly supported wavelet of length L=8

[R] Singular Gradient Test

2009-10-19 Thread Douglas M. Hultstrand
Hello, I posted this question last week and have not heard anything, I am wondering if anyone had ideas for testing a model relationship? I am working with a real-time hydrologic modeling system, and I am using R (R batch script on Linux) to create a non-linear relationship (exponential) bet

[R] Best SVM Performance measure?

2009-10-19 Thread Noah Silverman
Hi, This is probably going to be one of those, "It depends what you want" kind of answers, but I'm very curious to see if the group has an opinion or some general suggestions. The actual experiment is too complicated for a quick e-mail, but I'll summarize well enough(hopefully) to get the co

Re: [R] repeating values in levels()

2009-10-19 Thread Donald Braman
Thanks! I've figured out how to fix it, but how I got here is still a puzzle. :-) Cheers, Don On Sat, Oct 17, 2009 at 5:36 PM, Peter Ehlers wrote: > > Donald Braman wrote: > >> Can someone help me understand this results? >> >> levels(as.factor(miset1$facts_convict)) >>> >> [1] "1" "1" "2"

Re: [R] Time Series Data

2009-10-19 Thread Gabor Grothendieck
If you convert your dates to an object d of Date class then as.numeric(d) will be the number of days since the Epoch. See R News 4/1. On Mon, Oct 19, 2009 at 2:20 PM, Marlin Keith Cox wrote: > Hi all and thanks in advance. > > I am regressing Time and Weight, and then predicting Weight at > diff

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 wrote: > I am currently being defeated by grep.  I am a

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 <- substr(your

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.R"Thank you > >[[alternative HTML version deleted]] > > > rh...@rproject.org mailing list > https://stat.ethz.ch/mailman/listinfo/rhelp > PLEASE

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. http://ausdm09.freeforums.or

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 wrote: > Dear list,I have read really a lot the past few days, but I haven't found

[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] 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 a

[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] 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 wrote: > Dear all, > > Using R function "dwt", it seems that I cannot specify the wavelet > transformation like Haar. Wha

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 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 such as this? > > K

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 a

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] 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, wrote: > On Mon, 19 Oct 2009, Jun Chen wrote: > >> Dear, >> I would like to deal with microarray data, it can run when i dea

[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 decla

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

Re: [R] rbind to array members‏

2009-10-19 Thread Another Oneforyou
(resent as hotmail really cannot format plaintext, but I've just read Tony Plate's message that what I'd like to do might not be possible) > > library(abind) ## array binding I've looked into using abind() but it seems I might not understand it properly. I can build my 2 table array and insert a

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 mus

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 arra

[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] 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 wrote: > It seems that var() computes sample variance. It is straight forward > to compute population variance from sample variance. However, I feel > that it is sti

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 su

[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 combinat

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 wrote: Peng Yu wrote: Please see below that

[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 Servi

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 (paramet

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 wrote: > 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 > wrote: > > Dear R-g

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

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 (usual

[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? Th

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 wrote: > Dear R-gurus, > > Just supose I have a dara.frame that looks like > > myDF<-read.table(stdin(),head=T,sep=",") > codID,na

[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. However

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 unique(e$ye

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 loo

[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

[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

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 244

[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 > s

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 wrote: > Hi Suman, > See the read.spss function in the foreign package, e.g.: >

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] 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] 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

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] 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 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: Comp.1 Comp.2

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 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 > the help file

Re: [R] Pausing R

2009-10-19 Thread Karl Ove Hufthammer
In article , 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 ps" for this) and > then use "kill -STOP 12345" and "kil

[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 als

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

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)) w

[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 quart

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, O

[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 DIST

[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 test[1,

Re: [R] Pausing R

2009-10-19 Thread Rainer M Krug
On Mon, Oct 19, 2009 at 3:21 PM, Barry Rowlingson wrote: > On Mon, Oct 19, 2009 at 2:01 PM, Karl Ove Hufthammer 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

[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 curves

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 <

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

2009-10-19 Thread Liviu Andronic
On 10/19/09, Prof Brian Ripley 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 __ R-help@r-project.org mailing list ht

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 is

Re: [R] Pausing R

2009-10-19 Thread Barry Rowlingson
On Mon, Oct 19, 2009 at 2:01 PM, Karl Ove Hufthammer 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 the process th

Re: [R] Pausing R

2009-10-19 Thread Rainer M Krug
On Mon, Oct 19, 2009 at 3:01 PM, Karl Ove Hufthammer wrote: > In article @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

[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 ( WA

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 wrote: > Dear Ista > Thanks for answering, the previous question was a primer to what I wanted, I > did just what you said with "yearctry " belo

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 Kun

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]] > >

[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 p

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 alpha

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 pl

Re: [R] Pausing R

2009-10-19 Thread Karl Ove Hufthammer
In article , 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 'fg' when you want to resume it. -- Karl Ove Hufthammer

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"' inheritin

Re: [R] Pausing R

2009-10-19 Thread Rainer M Krug
On Mon, Oct 19, 2009 at 2:40 PM, Anders Carlsson 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 (since I

[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 po

[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: m<-matrix(scan("D:/SNPdata.txt"),

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.charac

[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 Te

[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] 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 m

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 worthle

[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

  1   2   >