[R] strange behaviour of median

2010-02-04 Thread Petr PIKAL
During some experimentation in preparing R lessons I encountered this behaviour which I can not explain fully mat - matrix(1:16, 4,4) df1 - data.frame(mat) mean(df1) X1 X2 X3 X4 2.5 6.5 10.5 14.5 Expected, documented median(df1) [1] 6.5 10.5 Rather weird, AFAIK there shall not

Re: [R] strange behaviour of median

2010-02-04 Thread Mario Valle
Linux 2.9.0 gives: median(df1) [1] 34 Ever stranger... mario Petr PIKAL wrote: During some experimentation in preparing R lessons I encountered this behaviour which I can not explain fully mat - matrix(1:16, 4,4) df1 - data.frame(mat) mean(df1) X1 X2 X3 X4

Re: [R] strange behaviour of median

2010-02-04 Thread Petr PIKAL
Hi Sorry, as many Windows users I forgot to mention version and platform version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Under development (unstable) major 2 minor 11.0

Re: [R] diagnostic plots

2010-02-04 Thread Trafim Vanishek
Thanks a lot everybody! I see how it works now. But now the other question: I would like to see the Cook's distance plot which is more understandable for me not the Residuals vs Leverage. The one it shows in the examples http://www.personality-project.org/r/r.lm.html But for some reason it

Re: [R] strange behaviour of median

2010-02-04 Thread Ted Harding
Well, I get the same as Petr with R version 2.10.0 (2009-10-26) on Linux. To me, this suggests that median is broken! Any user would, a priori, expect that median() should operate in exactly the same way as mean(). To extend Petr's example: mat - matrix(1:32, 4,8) df1 - data.frame(mat)

Re: [R] svm

2010-02-04 Thread Amy Hessen
Hi Achim, Thank you so much for your reply, could you please tell me how i call PLS . i' m sorry i tried but could not. Many thanks Amy Date: Thu, 4 Feb 2010 02:31:36 +0100 From: achim.zeil...@wu-wien.ac.at To: amy_4_5...@hotmail.com CC: mailinglist.honey...@gmail.com;

Re: [R] graphing help: line runs off top of graph

2010-02-04 Thread Faheem Mitha
On Wed, 3 Feb 2010, David Winsemius wrote: args - commandArgs() filename = args[6] m = read.csv(filename, header=TRUE) m = data.frame(scale(m, center=FALSE, scale = c(60, 1024^2, 1024^2, 1))) mRSS = m[,c(time, RSS)] mVSZ = m[,c(time, VSZ)] mPERCENT = m[,c(time, X.MEM)]

Re: [R] pickle in R

2010-02-04 Thread Patrick Burns
On 03/02/2010 23:20, Frank E Harrell Jr wrote: Gábor Csárdi wrote: Perhaps you are looking for ?serialize. Best, Gábor Wouldn't save( ) and load( ) be faster and result in much smaller files? Or possibly 'attach' rather than 'load'. Pat Frank On Thu, Feb 4, 2010 at 12:09 AM, mkna005

Re: [R] strange behaviour of median

2010-02-04 Thread Petr PIKAL
Hi so do you think I shall fire a bug announcement? I think I rather wait to see if there is some reaction from others. Maybe, there is some reason behind such behaviour. Those simple statistics tend to behave differently when operating on data.frames so median is not such a huge surprise.

[R] pca in R: Problem Fixed

2010-02-04 Thread ogbos okike
Good day all. This is to thank all those who have helped in fixing this problem. Starting with a text book was indeed a problem, however, that gave me a clue of what I was looking for. This, with your contributions added to other materials I got on the net, put me on the right track. Thank you so

[R] how to plot single frames as a movie?

2010-02-04 Thread Javier
Dear users, 1. Is there a way to create a movie file to play a sequence of single frames (e.g. plots) at a specified time delay between frames? 2. If making a movie file is not possible, then how can I incorporate in a loop some delay between the frames to be plotted so I can change

Re: [R] strange behaviour of median

2010-02-04 Thread Peter Ehlers
Petr PIKAL wrote: Hi so do you think I shall fire a bug announcement? I think I rather wait to see if there is some reaction from others. Maybe, there is some reason behind such behaviour. Those simple statistics tend to behave differently when operating on data.frames so median is not such

Re: [R] strange behaviour of median

2010-02-04 Thread Ted Harding
On 04-Feb-10 09:58:36, Petr PIKAL wrote: Hi so do you think I shall fire a bug announcement? I think I rather wait to see if there is some reaction from others. Maybe, there is some reason behind such behaviour. Those simple statistics tend to behave differently when operating on data.frames

Re: [R] how to plot single frames as a movie?

2010-02-04 Thread Eik Vettorazzi
Hi Javier, have a look at the animation-package on CRAN and http://animation.yihui.name/ hth. Javier schrieb: Dear users, 1. Is there a way to create a movie file to play a sequence of single frames (e.g. plots) at a specified time delay between frames? 2. If making a movie file

Re: [R] Changing an unordered factor into an ordered factor

2010-02-04 Thread Oliver Gondring
Hi Mathew, I'm trying to change an unordered factor into an ordered factor: Help it's all about reordering the factor levels, right? Have a look at this one: http://rwiki.sciviews.org/doku.php?id=tips:data-factors:factors The third textbox on the page (search for the string: Reorder

Re: [R] strange behaviour of median

2010-02-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.02.2010 11:31:51: Petr PIKAL wrote: Hi so do you think I shall fire a bug announcement? I think I rather wait to see if there is some reaction from others. Maybe, there is some reason behind such behaviour. Those simple statistics

Re: [R] strange behaviour of median

2010-02-04 Thread Karl Ove Hufthammer
On Thu, 4 Feb 2010 09:32:15 +0100 Petr PIKAL petr.pi...@precheza.cz wrote: median(df1) [1] 6.5 10.5 Rather weird, AFAIK there shall not be an issue with data frame at least I did not find any in help page. It's not exactly a bug, since 'median' is not documented to work on data frames

[R] mgcv problem

2010-02-04 Thread Rosa Manrique
Dear friends, I have install the last version 2.10 and now I have probles with 'mgcv' which can be load. I proved to eliminated and reinstalled but always obtain the same message: library (mgcv) This is mgcv 1.6-1. For overview type `help(mgcv-package)'. Error in runif(1) : .Random.seed is

Re: [R] strange behaviour of median

2010-02-04 Thread Karl Ove Hufthammer
On Thu, 4 Feb 2010 12:04:32 +0100 Karl Ove Hufthammer k...@huftis.org wrote: It's not exactly a bug, since 'median' is not documented to work on data frames (use 'sapply' or 'apply' for that), Note that this is slightly more complicated than what would appear at first sight. Both 'sapply'

Re: [R] comparison of parameters for nonlinear regression

2010-02-04 Thread Peter Ehlers
Nathalie Yauschew-Raguenes wrote: Hi, I have two series of data set (it's measurment of growth but under two different conditions). To model these data I use the same function which is : formula - y ~ Asym_inf + Asym_sup * ( (1 / (1 + (n1 * (exp( (tmid1-x) / scal1) )^(1/n1) ) ) ) - (1 / (1

Re: [R] mgcv problem

2010-02-04 Thread Simon Wood
Rosa, What happens if you type runif(1) before library(mgcv)? best, Simon On Thursday 04 February 2010 11:07, Rosa Manrique wrote: Dear friends, I have install the last version 2.10 and now I have probles with 'mgcv' which can be load. I proved to eliminated and reinstalled but always

Re: [R] Problem accessing help files

2010-02-04 Thread S Ellison
Might this be a firewall-like issue and nothing to do with html or R? If I understand the 2.10 help system, it operates by starting R as an http server - effectively a web server, operating on the local machine (127.0.0.1) with an unusual IP port (which doesn;t seem to be consistent from one run

[R] First differences back to Levels

2010-02-04 Thread Tolga Uzuner
Dear R Users, I am running a simple linear regression using lm between a set of time series using first differences. I would like to recover a predicted level for the dependent variable: basically start with the Day 1 level and then just add the predicted change to it from the first

[R] [Fwd: question on plot in R with mac]

2010-02-04 Thread khazaei
Hello all I want to simulate a sample from Dirichlet distribution with parameter alpha(.), for example: X=(0,1) alpha(.)=2*beta(1,1). Can you help me please? thank you khazaei __ R-help@r-project.org mailing list

[R] plm issues: error for within or random, but not for pooling

2010-02-04 Thread Liviu Andronic
Dear all I am working on unbalanced panel data and I can readily fit a pooling model using plm(), but not a within or random model. Reproducing the examples in vignette(plm) and in the AER package I encountered no such issues. ##unfortunately I cannot disclose the data, and it is too big anyway

[R] simulat from dirichet process

2010-02-04 Thread khazaei
Sorry for last mail because the subject was wrong. Hello all I want to simulate a sample from Dirichlet distribution with parameter alpha(.), for example: X=(0,1) alpha(.)=2*beta(1,1). Can you help me please? thank you khazaei __

[R] mgcv problem

2010-02-04 Thread Rosa Manrique
Dear friends, Again, after applied update. packages...'mgcv' dissapears, Errore in library(mgcv) : non c'è alcun pacchetto chiamato 'mgcv'.. there isn't into the library.without unistall it!.. I need some help! Thank you, Rosa. [[alternative HTML version deleted]]

Re: [R] mgcv problem

2010-02-04 Thread Rosa Manrique
Hi, thak you for answer..I wrote runif(1) nut there is an error message ... Errore in runif(1) : .Random.seed is not an integer vector but of type 'list' - Original Message - From: Simon Wood s.w...@bath.ac.uk To: r-help@r-project.org; Rosa Soledad Manrique Paredes

Re: [R] strange behaviour of median

2010-02-04 Thread Peter Ehlers
Hi Petr, a couple of comments inserted below. Petr PIKAL wrote: Hi r-help-boun...@r-project.org napsal dne 04.02.2010 11:31:51: Petr PIKAL wrote: Hi so do you think I shall fire a bug announcement? I think I rather wait to see if there is some reaction from others. Maybe, there is some

[R] Changing fonts of axis labels in Histogram() function

2010-02-04 Thread conor wilson
Dear All I am using the histogram() function to plot two subsets from my data on the same output display, i.e. there are two histogram plots My code is: histogram( ~ Age | Date, layout = c(1, 2), xlab = Age (years), strip = FALSE, strip.left = TRUE, col = black, border

[R] 2 dimensional interpolation from matlab to R

2010-02-04 Thread karine heerah
Hi everybody. i have 2 datasets : one with a long grid a lat grid and a bathymetry grid the second one only has the long and lat coordinates. So i want to know the bathymetry associated to the second dataset. I thought it was a good idea to do an interpolation between the two datasets. I

Re: [R] Changing fonts of axis labels in Histogram() function

2010-02-04 Thread Paul Hiemstra
conor wilson wrote: Dear All I am using the histogram() function to plot two subsets from my data on the same output display, i.e. there are two histogram plots My code is: histogram( ~ Age | Date, layout = c(1, 2), xlab = Age (years), strip = FALSE, strip.left =

[R] no write access for help files

2010-02-04 Thread Albert-Jan Roskam
Hi   I'm using R v2.8 under Windows*) and I'm trying to install a new package (local zip file), but I get the message below. I followed some advice at http://cran.r-project.org/bin/windows/base/rw-FAQ.html (4.2 onwards), but to no avail. How can I tell R to save the help files to an

Re: [R] [Fwd: question on plot in R with mac]

2010-02-04 Thread Peter Ehlers
khaz...@ceremade.dauphine.fr wrote: Hello all I want to simulate a sample from Dirichlet distribution with parameter alpha(.), for example: X=(0,1) alpha(.)=2*beta(1,1). Can you help me please? How is this a question on plot in R with mac? Anyway, maybe rdirichlet in the gtools package

Re: [R] how to plot single frames as a movie?

2010-02-04 Thread Barry Rowlingson
On Thu, Feb 4, 2010 at 10:58 AM, Eik Vettorazzi e.vettora...@uke.uni-hamburg.de wrote: Hi Javier, have a look at the animation-package on CRAN  and http://animation.yihui.name/ I've had some fun making web-based animations using the mootools javascript library. Instructions here:

Re: [R] problems with SPC charts in R

2010-02-04 Thread Peter Ehlers
I suspect that you may have set qcc.options(cex) to too large a value. Try lowering it with qcc.options(cex=whatever) -Peter Ehlers vikrant wrote: ok. I will give the example for which i m getting this error. The data for plotting R chart and S chart is very huge. SO i will take example for

[R] Conditional sampling?

2010-02-04 Thread Olga Lyashevska
Hello, I have a dataframe consisting of two columns. col1-factor(c(a,a,b,b,c,c)) col2-factor(c(a,b,c,d,e,f)) somedf-data.frame(col1,col2) somedf col1 col2 1 a d 2 a e 3 b f 4 b g 5 c h 6 c i sample(col1,2,replace=T) [1] b c

Re: [R] Histogram function from lattice package

2010-02-04 Thread Peter Ehlers
Is this what you want: singer1 - subset(singer, voice.part == Bass 1) brks - seq(65, 75, 2) histogram( ~ height, data = singer1, breaks = brks) or, slightly different: histogram( ~ height, data = singer1, breaks = brks, scales = list(x = list(at = brks))) -Peter Ehlers anna wrote:

[R] mgcv problem to load

2010-02-04 Thread Rosa Manrique
Dear friends, I cannot load the pachkages labdsv...which i do not understand is linked to 'mgcv' package. Anyway neither the last is loadable in my new R 2.10 version. Th emessage on the screen is the following: This is mgcv 1.6-1. For overview type `help(mgcv-package)'. Error in runif(1) :

[R] Retrieve estimates from glmer()

2010-02-04 Thread Nai-Wei Chen
Dear all, I am running glmer() in R. How can I retrieve the estimates of fixed effects and the variance of the random effects from the result? Thank you so much. Joe ___ ±zªº¥Í¬¡§Y®É³q ¡Ð ·¾³q¡b®t¼Ö¡b¥Í¬¡¡b¤...@¤@¦¸·d©w¡I

Re: [R] Memory Problem

2010-02-04 Thread Meenakshi
Hi, I have to run the repeat loop more than 50 times continuously. But it runs only 20 to 30 times only. After that the memory problem is coming. My dataset has 6321kb only. Then how to solve this problem. Meenakshi -- View this message in context:

Re: [R] Conditional sampling?

2010-02-04 Thread ONKELINX, Thierry
selection - subset(somedf, col1 != a) sample(selection$col2, 2, replace = TRUE) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium

Re: [R] graphing help: line runs off top of graph

2010-02-04 Thread David Winsemius
On Feb 4, 2010, at 4:42 AM, Faheem Mitha wrote: On Wed, 3 Feb 2010, David Winsemius wrote: args - commandArgs() filename = args[6] m = read.csv(filename, header=TRUE) m = data.frame(scale(m, center=FALSE, scale = c(60, 1024^2, 1024^2, 1))) mRSS = m[,c(time, RSS)] mVSZ = m[,c(time, VSZ)]

Re: [R] mgcv problem to load

2010-02-04 Thread Peter Ehlers
Looks like a problem with your .Random.seed, doesn't it? I have no idea how that got to be of type 'list', but I guess that either you or some package has fiddled with it. Have you quit R and restarted R during the time that you've had these problems? If so, there might be some funny thing in

[R] Prediction intervals for beta regression

2010-02-04 Thread Wearn, Oliver
Dear all, I am trying to get an estimate of uncertainty surrounding a single predicted value from a beta regression model (this is similar to a logistic glm - in that it involves a link function and linear predictor - but it uses the beta distribution rather than discrete binomial). For

Re: [R] Conditional sampling?

2010-02-04 Thread Olga Lyashevska
Thanks Thierry! On 04.02.2010, at 13:22, ONKELINX, Thierry wrote: selection - subset(somedf, col1 != a) sample(selection$col2, 2, replace = TRUE) I simplified it, but in fact it is not only 'a' to be eliminated, but thousands of rows. Can I use: col1sample-sample(col1,2,replace=T)

[R] R: plm issues: error for within or random, but not for pooling

2010-02-04 Thread Millo Giovanni
Dear Liviu, it's difficult to tell without seeing the data. I might guess that you have some completely empty groups about which Tapply complains when doing the time-demeaning, but it would be just a guess. I realize you can't share the data in the present form, but may I suggest you try and

Re: [R] comparison of parameters for nonlinear regression

2010-02-04 Thread Nathalie Yauschew-Raguenes
/Nathalie Yauschew-Raguenes wrote: / /Hi, I have two series of data set (it's measurment of growth but under two different conditions). To model these data I use the same function which is : formula - y ~ Asym_inf + Asym_sup * ( (1 / (1 + (n1 * (exp( (tmid1-x) / scal1) )^(1/n1) ) ) )

Re: [R] Memory Problem

2010-02-04 Thread jim holtman
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. How about providing information on your operating system and version of R. Also provide a list of all the objects in your workspace and the size of

Re: [R] Retrieve estimates from glmer()

2010-02-04 Thread Ben Bolker
Nai-Wei Chen s90225007 at yahoo.com.tw writes: I am running glmer() in R. How can I retrieve the estimates of fixed effects and the variance of the random effects from the result? Thank you so much. library(lme4) example(lmer) fixef(gm1) ## fixed effects VarCorr(gm1) ## var-cov structure

Re: [R] Package plm heterogenous slopes

2010-02-04 Thread Millo Giovanni
Dear Otto, please see ?pvcm and the section on variable coefficient models here http://www.jstatsoft.org/v27/i02/paper Should suit your needs; else please let me know. Best, Giovanni - original message - Message: 29 Date: Wed, 3 Feb 2010 16:27:45 +0200 From: Otto

Re: [R] Changing an unordered factor into an ordered factor

2010-02-04 Thread David Winsemius
On Feb 4, 2010, at 5:58 AM, Oliver Gondring wrote: Hi Mathew, I'm trying to change an unordered factor into an ordered factor: Help it's all about reordering the factor levels, right? It's hard to tell. You could be correct, but the OP never described his reasons for wanting ordered

Re: [R] tapply for function taking of 1 argument?

2010-02-04 Thread J. R. M. Hosking
sjaffe wrote: I'm sure I can put this together from the various 'apply's and split, but I wonder if anyone has a quick incantation: E.g. I can do tapply( data, groups, mean) but how can I do something like: tapply( list(data,weights), groups, weighted.mean ) ? (or: mapply is to sapply as ?

Re: [R] Creating a table with median for multiple variables

2010-02-04 Thread billy_no_mates
party votes1st 1 ind 335 2 ind 1614 3 fg 5468 4 lab 4272 5 ff 9343 6 ff12489 7 ff 8711 8 gp 4961 9 lab 3732 10 fg 7841 11lab NA 12 sf 2078 13 fg 4819 14 ff10679 15 sf

Re: [R] 2 dimensional interpolation from matlab to R

2010-02-04 Thread spencerg
Have you considered the fda package and the companion book, Functional Data Analysis with R and Matlab (Springer, 2009) by Ramsay, Hooker and Graves? This will NOT help you directly with bathymetry = f(long, lat), but will help with b=f(x)+e AND with translations between Matlab and R.

Re: [R] Help....package GPLOTS will not install. Linux

2010-02-04 Thread Uwe Ligges
After some update of gdata the package needs the Compress::Raw::Zlib perl module and tries to build it but fails. Please report the issue you found to the package maintainer. Please note that you are using a really outdated version of R . Uwe Ligges On 04.02.2010 01:29, Laurence Cooke

Re: [R] create zip archive in R

2010-02-04 Thread Uwe Ligges
On 04.02.2010 03:31, mkna005 mkna005 wrote: Hello all! I was wondering if it is possible to create a zip archive within R and add files to it? No. I know it is possible to unzip files but is it possible the other way round? No. For (compressed) archives see ?tar For other compression

Re: [R] tapply for function taking of 1 argument?

2010-02-04 Thread David Winsemius
On Feb 4, 2010, at 9:56 AM, J. R. M. Hosking wrote: sjaffe wrote: I'm sure I can put this together from the various 'apply's and split, but I wonder if anyone has a quick incantation: E.g. I can do tapply( data, groups, mean) but how can I do something like: tapply( list(data,weights),

[R] ggplot2 / time series with different scales

2010-02-04 Thread Chuck White
I am trying to plot this dataset using ggplot2: df - data.frame( sid = c(rep('11',30),rep('22',30)), time = rep(ISOdate(year = 2010, month = 1, day = 1:30),2), sales = c(rnorm(30, 1000, 20),rnorm(30, 900, 10)), price = c(rnorm(30, 2, 0.5),rnorm(30, 3,0.5)) ) Plotting just the sales

Re: [R] Changing an unordered factor into an ordered factor

2010-02-04 Thread David Winsemius
I'm guessing that the attachment did not make it to the list, since it was of a filetype that is not on the approved list and also because it was 5.4MB long. My mail-server has no such restrictions, so I do have your file of type .POR. Unfortunately I have serious reservations about

Re: [R] How to read HTML or TEXT file with tm package

2010-02-04 Thread Uwe Ligges
On 04.02.2010 06:58, Lica Oka wrote: Hi, everyone! I'm a novice at R with tm package. So I need your help!! I'd like to analyze some German texts using tm package for my papers. But somehow, I could not use it well. Now I'm using R ver.2.10.1 and tm package ver.0.5-2 on WindowsXP and also

[R] GLMM and false convergence (8) warnings

2010-02-04 Thread Nuria Roura-Pascual
Hi, I am doing a binomial GLMM with a random intercept using the formula below, but I always get the same warning message. m01 - lmer(pres~ HT + DN + dtree + DNm + cmnhi + cmxes + cplan + craan + lfphal0100 + lfov0100 + lfop0100 + (1|plot), family=binomial, data=vphal, verbose=TRUE) 0:

[R] export test results to csv

2010-02-04 Thread Ivan Calandra
Hi everybody! I would like to export the results of a test statistic in a *.csv file, but get an error. The code is below. The data are attached as .txt with tab as separator. I tried to get a sample dataset, but for some reason it didn't work, so please excuse the length of the file. I also

Re: [R] export test results to csv

2010-02-04 Thread jim holtman
Is 'test' a dataframe? Provide the output of 'str(test)' and that will give an idea of what the structure is and maybe what you have to do to get it into a format for a csv file. On Thu, Feb 4, 2010 at 11:44 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Hi everybody! I would like to

Re: [R] Fonts in X11(type=Xlib): Was: What font exactly is tkrplot looking for

2010-02-04 Thread Kevin E. Thorpe
Kevin E. Thorpe wrote: Hello. I am getting an error thrown from tkrplot. It is X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12 could not be loaded sessionInfo() R version 2.10.1 Patched (2009-12-29 r50852) i686-pc-linux-gnu locale: [1] LC_CTYPE=en_US

Re: [R] ggplot2 / time series with different scales

2010-02-04 Thread Dieter Menne
chuckwhite wrote: I am trying to plot this dataset using ggplot2: .. self-contained example removed How can I plot the price (using geom_point) in a separate plot just above the sales plot so that the xaxes match and the yaxes are different. To quote Hadley Wickham:

Re: [R] export test results to csv

2010-02-04 Thread David Winsemius
On Feb 4, 2010, at 11:44 AM, Ivan Calandra wrote: Hi everybody! I would like to export the results of a test statistic in a *.csv file, but get an error. What to you plan to do with this output file? The code is below. The data are attached as .txt with tab as separator. I tried to get

Re: [R] Help....package GPLOTS will not install. Linux

2010-02-04 Thread Gabor Grothendieck
Several things to try: 1. install ActiveState perl. I believe that that perl distribution already contains the offending perl module so you might be able to avoid building it, or 2. just remove src/Makefile from gdata so it does not try to build that perl module. You may lose some

Re: [R] create zip archive in R

2010-02-04 Thread Duncan Temple Lang
Uwe Ligges wrote: On 04.02.2010 03:31, mkna005 mkna005 wrote: Hello all! I was wondering if it is possible to create a zip archive within R and add files to it? No. Well, the Rcompression package on the Omegahat package does have some facilities for it. It doesn't do it in memory,

Re: [R] Changing an unordered factor into an ordered factor

2010-02-04 Thread Mathew, Abraham T
1. I need to make it an ordered factor in order to run ordered logit. I could keep it unordered and run a multinomial logit, but that's beyond my capacity as a new social science grad student (can't interpret it) 2. this is the sample code I tried before running it on my data. x -

Re: [R] problems with SPC charts in R

2010-02-04 Thread Bart Joosen
I'm sorry, I'm doing this in my spare time, hadn't time during the day. But I tried your example, and didn't get the error. If you get the error with your example (with the data you had sent to this list), then I think Peter is right, and it has something to do with margins you had set. Try to

Re: [R] create zip archive in R

2010-02-04 Thread Max Kuhn
The odfWeave package would really benefit from having an R zip function to zip a directory to an archive with an .odt extension. The need for an external zip/uniz utilities has been an issue for many non-technical windows users. Max On Thu, Feb 4, 2010 at 11:14 AM, Duncan Temple Lang

Re: [R] problems with SPC charts in R

2010-02-04 Thread Bart Joosen
I'm sorry, I'm doing this in my spare time, hadn't time during the day. But I tried your example, and didn't get the error. If you get the error with your example (with the data you had sent to this list), then I think Peter is right, and it has something to do with margins you had set. Try to

Re: [R] no write access for help files

2010-02-04 Thread Duncan Murdoch
On 04/02/2010 7:12 AM, Albert-Jan Roskam wrote: Hi I'm using R v2.8 under Windows*) and I'm trying to install a new package (local zip file), but I get the message below. I followed some advice at http://cran.r-project.org/bin/windows/base/rw-FAQ.html (4.2 onwards), but to no avail. How can I

Re: [R] List of object properties

2010-02-04 Thread Greg Snow
Others mentioned the str function which gives the full structure of the object and lots of information. If you just want the names of the top level elements then the names function is a little quicker and less cluttered (but does not give all the detail that str does). For large and/or

Re: [R] no write access for help files

2010-02-04 Thread Uwe Ligges
On 04.02.2010 13:12, Albert-Jan Roskam wrote: I'm using R v2.8 under Windows*) and I'm trying to install a new package (local zip file), but I get the message below. I followed some advice athttp://cran.r-project.org/bin/windows/base/rw-FAQ.html (4.2 onwards), but to no avail. How can I

Re: [R] population variance and sample variance

2010-02-04 Thread Greg Snow
Probably not a typo, but a different textbook used originally. Statistics is still a relatively young science, so we have not settled on a single set of notation/symbols/jargon yet (look at intro textbooks, is p the population proportion (with p-hat the sample) or is p the sample proportion

Re: [R] ggplot2 / time series with different scales

2010-02-04 Thread Xie Chao
you can use facet_wrap: df - melt(df, id=c('time', 'sid')) ggplot(df, aes(time, value, colour=sid)) + geom_line(data = subset(df, variable=='sales')) + geom_point(data = subset(df, variable=='price')) + facet_wrap(~variable, ncol=1, scales='free_y') Xie Chao On Fri, Feb 5, 2010 at

[R] coefs from summary.lm of an aov object

2010-02-04 Thread Martin Ivanov
Dear R users, This is probably a very stupid question, nevertheless I obviously am not qualified enough to cope with it. I do not understand what the coefficients are that are output by running summary.lm on an aov object. I thought they should be the differential effects for the levels of

Re: [R] population variance and sample variance

2010-02-04 Thread Ista Zahn
Ah, that makes sense. Thanks for the clarification Greg. -Ista On Thu, Feb 4, 2010 at 5:58 PM, Greg Snow greg.s...@imail.org wrote: Probably not a typo, but a different textbook used originally.  Statistics is still a relatively young science, so we have not settled on a single set of

Re: [R] Problem accessing help files

2010-02-04 Thread Jonathan
Duncan: I set Firefox as the default browser; didn't need to delete and reinstall. Problem solved - now help is working properly; opening the documents in Firefox. By the by, despite IE's failings, the tab preview feature, when hovering the mouse over the icon on Windows 7 taskbar, is pretty

Re: [R] population variance and sample variance

2010-02-04 Thread Gabor Grothendieck
Checking VAR_SAMP and VAR_POP in the H2 and PostgreSQL databases and VAR and VARP in Excel we find that in all three cases the sample variance uses n-1. Here is an R example using H2 and sqldf: library(RH2) library(sqldf) DF - data.frame(x = 1:3) sqldf(select VAR_SAMP(x), VAR_POP(x) from DF)

Re: [R] coefs from summary.lm of an aov object

2010-02-04 Thread David Winsemius
On Feb 4, 2010, at 1:02 PM, Martin Ivanov wrote: Dear R users, This is probably a very stupid question, nevertheless I obviously am not qualified enough to cope with it. I do not understand what the coefficients are that are output by running summary.lm on an aov object. I thought they

Re: [R] population variance and sample variance

2010-02-04 Thread Peng Yu
On Thu, Feb 4, 2010 at 11:58 AM, Greg Snow greg.s...@imail.org wrote: Probably not a typo, but a different textbook used originally.  Statistics is still a relatively young science, so we have not settled on a single set of notation/symbols/jargon yet (look at intro textbooks, is p the

[R] help needed using t.test with factors

2010-02-04 Thread Thomas Adams
I am trying to use t.test on the following data: datetypeINTERVALnCASESMTFSDFMTOSDO nFSTMFnOBSMOMBBIASCVBIASEVMEMAE RMSECRCF 2001-06-15avnGE1.0043850.2460.3001.502 0.55613671.3734385

[R] for loop with if statment problem

2010-02-04 Thread stephen sefick
Both of the approx functions work correctly individually, but they are not being distinguished in the for loop by the if statments. Any help would be appreciated. for loop of interest is below x - (structure(list(Site = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,

Re: [R] Interactively editing point labels in a graph

2010-02-04 Thread Gavin Simpson
On Tue, 2010-02-02 at 23:57 -0800, trece por ciento wrote: Dear experts, I would like to be able to interactively (if possible, with mouse and clik) edit point labels in graphs, particularly in multivariate graphs, such as the biplots you get after a correspondence analysis (with, for

Re: [R] help needed using t.test with factors

2010-02-04 Thread Thomas Adams
Dennis, Thank you for the suggestion, but I get this error: t.test(MAE ~ type,data=data) Error in t.test.formula(MAE ~ type, data = data) : grouping factor must have exactly 2 levels Tom Dennis Murphy wrote: Hi: On Thu, Feb 4, 2010 at 11:07 AM, Thomas Adams thomas.ad...@noaa.gov

Re: [R] help needed using t.test with factors

2010-02-04 Thread Peter Ehlers
Somehow, in looking for those many examples, you missed the 'sleep' data example on the help page for t.test. (BTW, I wouldn't consider your sample data to be minimal or even close to minimal.) -Peter Ehlers Thomas Adams wrote: I am trying to use t.test on the following data: datetype

Re: [R] coefs from summary.lm of an aov object

2010-02-04 Thread Ista Zahn
Hi Martin, See ?contrasts and associated help pages ?contr.sum, ?contr.treatment etc. Also note that you can set contrasts manually: D - data.frame(y = rnorm(20), group - factor(c(rep(A, 5), rep(B, 5), rep(C, 5), rep(D, 5 group.dumcodes - matrix(c(0, 0, 0, 1, 0, 0,

Re: [R] help needed using t.test with factors

2010-02-04 Thread Peter Ehlers
Tom, t.test(MAE ~ type, data=data, subset=type %in% c('hpc','rfc')) -Peter Ehlers Thomas Adams wrote: Dennis, Thank you for the suggestion, but I get this error: t.test(MAE ~ type,data=data) Error in t.test.formula(MAE ~ type, data = data) : grouping factor must have exactly 2 levels

Re: [R] help needed using t.test with factors

2010-02-04 Thread Thomas Adams
Peter, Thanks for pointing that out; the 'sleep' data looks like this: sleep extra group 10.7 1 2 -1.6 1 3 -0.2 1 4 -1.2 1 5 -0.1 1 63.4 1 73.7 1 80.8 1 90.0 1 10 2.0 1 11 1.9 2 12 0.8 2 13 1.1 2 14 0.1

[R] Legend symbol?

2010-02-04 Thread Douglas M. Hultstrand
Hello, I am creating a plot/image using different data and a couple fit lines (see attached image). In the legend, I want the Default and Exponential symbol to be a line. I am using the pch command, I tried to use - to represent a line but does not work so I currently have set as a 1. Any

[R] Minimizing two non-linear functions with genoud - Trying to minimize or converge near zero

2010-02-04 Thread Guillaume Théroux Rancourt
Hello R users, I am trying to minimize two functions with genoud. It is actually one function with two sets of data, each of them having two unknown variables (called Vcmax and gi) which have the same value in each of the function. They are called f.1 and f.2 in the code below. My objective

Re: [R] help needed using t.test with factors

2010-02-04 Thread Thomas Adams
Peter, Thank you very much! That did the trick… Regards, Tom Peter Ehlers wrote: Tom, t.test(MAE ~ type, data=data, subset=type %in% c('hpc','rfc')) -Peter Ehlers Thomas Adams wrote: Dennis, Thank you for the suggestion, but I get this error: t.test(MAE ~ type,data=data) Error in

Re: [R] What are Type II or III contrast? (contrast() in contrastpackage)

2010-02-04 Thread Liaw, Andy
From: Peng Yu On Wed, Feb 3, 2010 at 2:12 AM, Emmanuel Charpentier charp...@bacbuc.dyndns.org wrote: Le mercredi 03 février 2010 à 00:01 -0500, David Winsemius a écrit : On Feb 2, 2010, at 11:38 PM, Peng Yu wrote: ?contrast in the contrast package gives me the following description.

Re: [R] for loop with if statment problem

2010-02-04 Thread Peter Ehlers
Stephen, You probably should name your dataframe 'dat' and replace the line x - subset(x, Creek==fbms station==i) with x - subset(dat, Creek==fbms station==i) -Peter Ehlers stephen sefick wrote: Both of the approx functions work correctly individually, but they are not being

Re: [R] How to export the examples in help(something) to a file?

2010-02-04 Thread Liaw, Andy
From: Peng Yu On Wed, Feb 3, 2010 at 10:01 AM, Peng Yu pengyu...@gmail.com wrote: Some examples in the help page are too long to be copied from screen. Could somebody let me know some easy way on how to extract the example to a file so that I can play with them? I forget to

[R] Filling a logical matrices with values

2010-02-04 Thread anna freni sterrantino
Hello !! I have this problem: A matrix on True/False and as many numerical vectors as columns, but of different length. What I 'd like to get is this: set.seed(12) dat - as.data.frame(matrix(as.logical(sample(T:F, 30, T)),5,6)) colnames(dat) - letters[1:6] rownames(dat) -

[R] Zero inflated negat. binomial model

2010-02-04 Thread Luciano La Sala
Dear R crew: I think I am in the right mailing list. I have a very simple dataset consisting of two variables: cestode intensity and chick size (defined as CAPI). Intensity is clearly overdispersed, with way too many zeroes. I'm interested in looking at the association between these two

  1   2   >