[R] (lme4: lmer) mcmcsamp: Error in if (var(y) == 0)

2008-01-24 Thread David Reitter
I've got a problem with mcmcsamp used with glmer objects produced with lmer from the lme4 package. When calling mcmcsamp, I get the error Error in if (var(y) == 0) { : missing value where TRUE/FALSE needed This does not occur with all models, but I can't find anything wrong with the

Re: [R] package manual in pdf

2008-01-24 Thread christophe.genolini
Duncan Murdoch a écrit : On 23/01/2008 7:37 PM, [EMAIL PROTECTED] wrote: Hi all, I am trying to write a pdf manual for my package. I create a file inst\doc\myDoc.tex. I taught that R CMD build will call latex on this file (like it is said in Writing R extension), but it does not happen.

[R] features boxplot

2008-01-24 Thread Schmitt, Corinna
Hallo, I just made a boxplot with the following command: boxplot(vsnrg$M~col(vsnrg$M)) When I now look at the plot. On the x-axis I just find numbers 1-6 because I have 6 datasets plotted. Now I want to add there the corresponding names which can be found in colnames(qrg). How can I realize this

[R] hello

2008-01-24 Thread elyakhlifi mustapha
hello, happy new year. I want to know if it's possible to send a bar chart from the software R to an directory. Thanks. _ [[alternative HTML version deleted]]

[R] store variable as tab-del. txt-file

2008-01-24 Thread Schmitt, Corinna
Hallo, how can I store a variable as a tab-delimited txt-file? I crated a variable with the following commands: fit12-lmFit(qrg[,1:2]) t12-toptable(fit12,adjust=fdr,number=25,genelist=qrg$genes[,1]) t12 ID logFC t P.Value adj.P.ValB 522PLAU_OP

[R] R help?

2008-01-24 Thread vic zhong
Hey does anyone know how to do t.test for beta1 and beta0, which are the slope and intercept of the linear regression Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] store variable as tab-del. txt-file

2008-01-24 Thread Henrique Dallazuanna
See ?write.table On 24/01/2008, Schmitt, Corinna [EMAIL PROTECTED] wrote: Hallo, how can I store a variable as a tab-delimited txt-file? I crated a variable with the following commands: fit12-lmFit(qrg[,1:2]) t12-toptable(fit12,adjust=fdr,number=25,genelist=qrg$genes[,1]) t12

Re: [R] hello

2008-01-24 Thread Julien Barnier
Hi, I want to know if it's possible to send a bar chart from the software R to an directory. Do you mean saving your figure to a file ? If so, you can take a look at the device functions, which allow you to generate your figure to a file in different formats, especially pdf or postscript. For

Re: [R] store variable as tab-del. txt-file

2008-01-24 Thread Julien Barnier
Hi, Now I want to store t12 as a tab-delimited txt-file to use it in other programm. How can I realize this? Did you take a look at the write.table() function ? You can supply «\t» as «sep» argument to get a tab-delimited file. Hope that helps, Julien -- Julien Barnier Groupe de recherche

Re: [R] features boxplot

2008-01-24 Thread Henrique Dallazuanna
Try this: boxplot(vsnrg$M~col(vsnrg$M), xaxt=n) axis(1, at=1:length(colnames(qrg)), labels=colnames(qrg)) On 24/01/2008, Schmitt, Corinna [EMAIL PROTECTED] wrote: Hallo, I just made a boxplot with the following command: boxplot(vsnrg$M~col(vsnrg$M)) When I now look at the plot. On the

Re: [R] plot help

2008-01-24 Thread Henrique Dallazuanna
Try this: #some data y1=rnorm(1:3) y2=rnorm(1:3) #draw two plots on the same screen par(mfrow=c(2,1),oma = c(6, 0, 5, 0)) par(mar=c(0, 5.1, 0, 5.1)) plot(y1,xaxt=n,type=n) #1st plot par(mar=c(0, 5.1, 0, 5.1)) plot(y2,xaxt=n,type=n) #2nd plot #try to draw lines onto each plot on the screen

[R] png to html

2008-01-24 Thread elyakhlifi mustapha
hello, to display my histogram from a png file to a html file I use this syntax myplot2 - png(file=file.path(directory,myplot2.png), bg=transparent) plot(1:10) rect(1, 5, 3, 7, col=white) dev.off() png:C:/Documents and Settings/melyakhlifi/Bureau/myplot.png

Re: [R] png to html

2008-01-24 Thread Prof Brian Ripley
On Thu, 24 Jan 2008, elyakhlifi mustapha wrote: hello, to display my histogram from a png file to a html file I use this syntax myplot2 - png(file=file.path(directory,myplot2.png), bg=transparent) Please re-read ?png: myplot2 will be NULL. plot(1:10) rect(1, 5, 3, 7, col=white) dev.off()

Re: [R] plot help

2008-01-24 Thread tom soyer
Thanks Henrique! On 1/24/08, Henrique Dallazuanna [EMAIL PROTECTED] wrote: Try this: #some data y1=rnorm(1:3) y2=rnorm(1:3) #draw two plots on the same screen par(mfrow=c(2,1),oma = c(6, 0, 5, 0)) par(mar=c(0, 5.1, 0, 5.1)) plot(y1,xaxt=n,type=n) #1st plot par(mar=c(0, 5.1, 0, 5.1))

Re: [R] store variable as tab-del. txt-file

2008-01-24 Thread Schmitt, Corinna
Hallo Julien, thanks for the hint. It works now. Corinna -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Barnier Sent: Thursday, January 24, 2008 11:08 AM To: [EMAIL PROTECTED] Subject: Re: [R] store variable as tab-del. txt-file Hi, Now

Re: [R] package manual in pdf

2008-01-24 Thread Duncan Murdoch
christophe.genolini wrote: Duncan Murdoch a écrit : On 23/01/2008 7:37 PM, [EMAIL PROTECTED] wrote: Hi all, I am trying to write a pdf manual for my package. I create a file inst\doc\myDoc.tex. I taught that R CMD build will call latex on this file (like it is said in Writing R

[R] Rcom package

2008-01-24 Thread Uma Sitaraman
Hi, I have R 2.5.1 installed in my system and have installed rcom package 1.5-2.2 vesion. I don't see the following reference RCOM 1.0 Type Library in the VBA IDE. Please help. Also, after installing when I type comRegisterRegistry(), it return NULL. Is that ok? Same with comRegisterServer().

[R] Sliding Window Time Series Analysis - hourly rainfall

2008-01-24 Thread Jamie Ledingham
I have a time series of rainfall in a dataframe. I would like to be able to aggregate this using a sliding window approach- i.e. a new 24 hourly total is calculated for each hours rainfall. I'm struggling to understand how this might be achieved - currently I've tried looping a sum function to

[R] Why I cannot get the intervals from Rails data ?

2008-01-24 Thread Dr. Ottorino-Luca Pantani
Dear R users, I would like to know where I'm wrong doing the following. lmList(Rail) is working fine, since it gives back the ouput. But on intervals(lmList(Rail)) I'm getting the following error Errore in out[, est., ] - coeff[, Estimate, ] : numero di indici non corretto that translated

[R] adjustment on the x-axis scale width

2008-01-24 Thread mohamed nur anisah
Hi, I have sucessfully plotted the graph by using the following command: ec-rep(0,length(e)) fc-rep(0,length(f)) plot(e,ec,type=p,col=1,pch=19) points(f,fc,col=2,pch=20) legend(1.0e+08,1.0,c(dog, human),text.col=green4,pch=c(19,20),col=c(1,2)) Below are the values for e and

Re: [R] Stationarity of a Time Series

2008-01-24 Thread stephen sefick
This is a little far afield but I will be back with R/analysis questions as things progress: I am working with a dissolve oxygen signal, so there is defiantly seasonality, There are local changes in mean and variability (with a graphical investigation on the order of around seven days). I am

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-24 Thread Kevin E. Thorpe
Charles C. Berry wrote: On Wed, 23 Jan 2008, Kevin E. Thorpe wrote: Frank E Harrell Jr wrote: Charles C. Berry wrote: On Wed, 23 Jan 2008, Frank E Harrell Jr wrote: Kevin E. Thorpe wrote: Kevin E. Thorpe wrote: Gabor Grothendieck wrote: It eliminates Hmisc and R by giving you a tex

[R] Memory problem

2008-01-24 Thread Yoni Stoffman
Hi All, There is something I don't quite understand about R memory management. I have the following function function (AdGroupId) { print(memory.size()) channel - odbcConnect(RDsn, uid = , case = tolower, pwd = xx) Tree1 - sqlQuery(channel, exec SelectAdgroups

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-24 Thread Kevin E. Thorpe
Kevin E. Thorpe wrote: Charles C. Berry wrote: On Wed, 23 Jan 2008, Kevin E. Thorpe wrote: Frank E Harrell Jr wrote: Charles C. Berry wrote: On Wed, 23 Jan 2008, Frank E Harrell Jr wrote: Kevin E. Thorpe wrote: Kevin E. Thorpe wrote: Gabor Grothendieck wrote: It eliminates Hmisc and R

[R] Printing large number

2008-01-24 Thread alex lam (RI)
Dear R users, Just a quick question, how do I prevent 10 printed as 1e+05 when I print it into a file? Thanks, Alex Alex C. Lam Roslin Institute (Edinburgh) Midlothian EH25 9PS United Kingdom Tel: +44 131 5274471 Roslin Institute is a company

[R] vector generation

2008-01-24 Thread Juan Pablo Fededa
Dear Contributors: I have the next vector: Z z = (526, 0.1, 110, 0.2, 34, 0.4, 614, 0.5, 1, 14, 15) I want to generate a vector containing the values higher than 1 corresponding to the z vector, wich in this case will mean to generate the next vector: (526, 110, 34, 614, 14, 15) If you

[R] surface plot

2008-01-24 Thread threshold
Hi, there is following issue, which I encounter when doing data analysis. Say we have data in form of the matrix x: x [,1] [,2] [,3] [1,] 0.14 10 [2,] 0.25 11 [3,] 0.15 12 [4,] 0.16 13 [5,] 0.24 14 [6,] 0.35 16 now I want to do surface plot of

[R] save a plot from R graphics window (in Windows)

2008-01-24 Thread Giovanni Maria Marchetti
Dear R users since R 2.6.0 when I try to save a graph from the Rgraphic device I find that the system becomes so slow that I'm forced to kill the process. This usually does not happen at the beginning of the session. The problem seems to arise when the system opens the dialog window to choose

[R] Calculating sum of squares from density estimates

2008-01-24 Thread Rainer M Krug
Hi I have some density estimates obtained from density(). I would like to calculate the sum of squares of these. As the x values of the estimates are not the same, and I would prefer not to restrict the estiomate to a certain range of x values, how can I do the calculation? Lets say: d1 -

Re: [R] surface plot

2008-01-24 Thread Duncan Murdoch
On 24/01/2008 8:59 AM, threshold wrote: Hi, there is following issue, which I encounter when doing data analysis. Say we have data in form of the matrix x: x [,1] [,2] [,3] [1,] 0.14 10 [2,] 0.25 11 [3,] 0.15 12 [4,] 0.16 13 [5,] 0.24 14 [6,]

Re: [R] vector generation

2008-01-24 Thread Albert Greinoecker
z[z 1] regards, Albert Am Donnerstag, den 24.01.2008, 10:54 -0300 schrieb Juan Pablo Fededa: Dear Contributors: I have the next vector: Z z = (526, 0.1, 110, 0.2, 34, 0.4, 614, 0.5, 1, 14, 15) I want to generate a vector containing the values higher than 1 corresponding to the

Re: [R] singular.ok in lm

2008-01-24 Thread Prof Brian Ripley
On Thu, 24 Jan 2008, Martin Eklund wrote: Dear R users, I'm wondering about the singular.ok option in lm. If singular.ok is set to TRUE does it mean that we allow the generalized inverse of (X'X)^-1 (where X are the independent variables and ' denotes the transpose)? Or is the singularity

Re: [R] save a plot from R graphics window (in Windows)

2008-01-24 Thread Duncan Murdoch
On 24/01/2008 9:00 AM, Giovanni Maria Marchetti wrote: Dear R users since R 2.6.0 when I try to save a graph from the Rgraphic device I find that the system becomes so slow that I'm forced to kill the process. This usually does not happen at the beginning of the session. The problem seems

Re: [R] Lattice on FreeBSD

2008-01-24 Thread Rainer Hurling
-- X-USF-Spam-Status: hits=-2.5 tests=BAYES_00,FORGED_RCVD_HELO X-USF-Spam-Flag: NO Armin Goralczyk, I am working with FreeBSD 8.0-CURRENT, R-2.6.1 and lattice() installs fine. I think you have to update your FreeBSD ports tree. Afterwards you can install R-2.6.0. The newest version R-2.6.1 is

[R] two histograms in the same graph

2008-01-24 Thread Juan Pablo Fededa
Dear Contributors: I have two vectors x and z, and I want to display the histograms of both vectors in the same graph, x in red bars, z in blue bars. If you have any clue on how to do that, I will be very glad to hear it!! Thanks in advance again, Juan Pablo Fededa [[alternative

Re: [R] Parametric survival models with left truncated, right censored data

2008-01-24 Thread Terry Therneau
Bill Meeker's programs for reliability analysis can fit this, they are part of his SPLIDA package for Splus. I'm not sure that anyone has ported these to R however. The survreg routine does not handle this case, and psm call survreg to do the actual work. Terry Therneau

[R] Maximum entropy spectral analysis

2008-01-24 Thread Nuno Prista
Hi, Is there on R a package containing Maximum entropy spectral analysis function? Thanks in advance, Nuno Prista __ Instituto de Oceanografia - FCUL, Portugal Center for Quantitative Fisheries Ecology - ODU, USA

[R] possible inconsistency in nlme logLik or me

2008-01-24 Thread Daniel O'Shea
Hello, I am comparing 2 nonlinear models one with a correlation structure. I used the gnls command in the nlme package to fit model 1 and then the update(mod1,corr=corExp(form=~lat+lon,nugget=T) to fit the same model but with a correlation structure. I am comparing models using AIC, but I am

Re: [R] problems with .svg

2008-01-24 Thread Mag. Ferri Leberl
Dear everybody, I still didn't manage to install the RSvgDevice-Package. Please, note the attached file: The server cannot seriousely be the problem. I would be glad if you could find the mistake. Thank you in advance. Yours, Mag. Ferri Leberl Am Sonntag, den 20.01.2008, 18:29 + schrieb

Re: [R] two histograms in the same graph

2008-01-24 Thread ONKELINX, Thierry
That's an easy one with ggplot2. library(ggplot2) dataset - data.frame(variable = gl(2, 50, labels = c(x, z)), value = c(runif(50), rnorm(50))) ggplot(data = dataset, aes(x = value, fill = variable)) + geom_histogram(position = dodge) + scale_fill_manual(values = c(red, blue), guide = tile) But

Re: [R] save a plot from R graphics window (in Windows)

2008-01-24 Thread john seers (IFR)
Hi Are you sure this is an R problem? The Choose dialog can be very slow if you have networked directories that cannot be connected to. Windows tries to connect repeatedly and each time waits for a timeout. Suggest you check your mapped network drives. Regards JS --- Dear R users since

Re: [R] two histograms in the same graph

2008-01-24 Thread Duncan Murdoch
On 1/24/2008 9:43 AM, Juan Pablo Fededa wrote: Dear Contributors: I have two vectors x and z, and I want to display the histograms of both vectors in the same graph, x in red bars, z in blue bars. If you have any clue on how to do that, I will be very glad to hear it!! It's hard to

[R] Ryacas behaving weird

2008-01-24 Thread francogrex
There is either something wrong with either me or is Yacas/Ryacas doing odd things. See below I ask to simpify an expression and the there's output! If this is a simplification.. well.. Do you think there is something set wrong somewhere. Thanks. library(Ryacas) Loading required package: XML

Re: [R] Calculating sum of squares from density estimates

2008-01-24 Thread David Winsemius
Rainer M Krug [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Hi I have some density estimates obtained from density(). I would like to calculate the sum of squares of these. As the x values of the estimates are not the same, and I would prefer not to restrict the estiomate to a

Re: [R] image question

2008-01-24 Thread Greg Snow
Here is another approach that may or may not be easier: library(TeachingDemos) x - 0:4 y - 0:20 z - matrix( runif(80), ncol=20 ) image(x,y,z) clipplot( image(x,y,z, col=heat.colors(12), add=TRUE), xlim=c(0,1) ) clipplot( image(x,y,z, col=terrain.colors(12), add=TRUE), xlim=c(1,2) )

[R] Barplot w/ single stacked bar

2008-01-24 Thread Muenchen, Robert A (Bob)
Hi All, I can get the barplot function to do many types of plots, stacked or otherwise. However, I cannot get it to do a *single* stacked bar. I've searched several books listserv archives to no avail. I suspect I'm missing the obvious from the help file! I can reach my goal in ggplot2,

Re: [R] R help?

2008-01-24 Thread Greg Snow
Use summary on the fitted lm object, i.e.: fit - lm(y ~ x, data=mydata) summary(fit) And the t-tests will be printed (along with a bunch of other stuff). You can also save the results of summary if you want to use the t-values and p-values for something else. Hope this helps, -- Gregory

[R] TAF/METAR decoder

2008-01-24 Thread Ptit_Bleu
Hi, I'm looking for a script to translate TAF/METAR code into comprehensive text that I can include in a R-script (METAR is the international standard code format for hourly surface weather observations). I haven't seen anything in the libraries. Do you think such a thing exists for R ? Thanks

Re: [R] plot help

2008-01-24 Thread Greg Snow
Look at the examples for cnvrt.coords in the TeachingDemos package, they might give you some ideas to accomplish what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL

Re: [R] Barplot w/ single stacked bar

2008-01-24 Thread Marc Schwartz
Muenchen, Robert A (Bob) wrote: Hi All, I can get the barplot function to do many types of plots, stacked or otherwise. However, I cannot get it to do a *single* stacked bar. I've searched several books listserv archives to no avail. I suspect I'm missing the obvious from the help file!

Re: [R] adjustment on the x-axis scale width

2008-01-24 Thread Greg Snow
Specify xlim and ylim in the plot function to set the limits on the x/y axis. See ?plot.default for details. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED]

[R] readClipboard() from spreadsheet to data.frame with column names?

2008-01-24 Thread Kenneth Hobson
This code opens a CSV file from the working directory set by wd. I copy 2 or more columns in the spreadsheet and then close it. What I need help with is setting the first row as the column names in clipboardTextAsDF. There is probably a simple or better way to do this but I have been away

Re: [R] Printing large number

2008-01-24 Thread Greg Snow
There is more than one way, but probably the easiest is to set options(scipen= some big number). See ?options for details. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From:

Re: [R] Fortran level mismatch between package and R

2008-01-24 Thread Steve Simmons
On Jan 18, 2008, at 5:57 PM, Hesen Peng wrote: Hi, I recompiled R using gfortran in my personal laptop. But I think it may help if you build an agent C program which calls the FORTRAN program, and then call the C program from R. I'm also curious on how to solve this problem without too

Re: [R] Bar width and labels in barchart

2008-01-24 Thread Deepayan Sarkar
On 1/23/08, Spilak,Jacqueline [Edm] [EMAIL PROTECTED] wrote: Hi everyone I am using barchart to make my graphs. Here is my code. barchart(percent_below ~ factor(Year)| factor(Season, levels=unique(Season)), data= .season_occurrence, origin = 0, layout = c(4, 1),

Re: [R] Barplot w/ single stacked bar

2008-01-24 Thread Muenchen, Robert A (Bob)
Marc Eric, Thanks so much for the help. That is exactly what I was looking for. I should have mentioned that I don't really like this plot, but I'm writing an explanation of the Grammar of Graphics concept. A very nice example of that is that a single stacked bar chart converts to a pie chart

Re: [R] problems with .svg

2008-01-24 Thread Prof Brian Ripley
I suspect you have ignored 'If you are using an old version of R and think it does not work properly, upgrade to the latest version and try that, before posting.' (from the posting guide). You didn't tell us your R version (as we asked in the posting guide) and so we have assumed it was

[R] Using and external text editor with R

2008-01-24 Thread sewatkins
I am a new user of Crimson editor and was hoping that someone could help me to integrate Crimson Editor to run programs in R. I have tried the following and I receive an error message stating Argument Ignored. Command: C:\Program Files\R\R-2.6.0\bin\Rgui.exe Argument: $(FileName) $(FileDir)

[R] boxplot axis labelling

2008-01-24 Thread [EMAIL PROTECTED]
Hi, i'm very new to R, so sorry for what i'm sure is a very basic question. I'm producing a boxplot with the data below: df3-data.frame( x=c(10,11,115,12,13,14,16,17,18,21,22,23,24,26,27,28,29,3,30,32,33,34,35,4,4 1,45,5,50,52,56,58,6,67,6738,68,7,8,9),

[R] HELP cpa in R

2008-01-24 Thread TEBBI FATIMA
hi, iam working with cpa method ade4 and want to simulate with this mehod is it possible and how ? thank you - [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Maximum entropy spectral analysis

2008-01-24 Thread Dieter Menne
Nuno Prista nmprista at fc.ul.pt writes: Is there on R a package containing Maximum entropy spectral analysis function? Burg and Yule-Walker are in spec.ar(stats) Dieter __ R-help@r-project.org mailing list

[R] Filling data frame data into a matrix - please help

2008-01-24 Thread Srinivas Iyyer
Dear group, I have a data.frame (d1) with various elements and a matrix (m1) created with NA (or 1s). I want to read each row,column in d1 and fill its numeric value in m1. Could some one help me because I have 130K rows and 500 column data.frame object and I was told that a for loop will take a

[R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-24 Thread David Airey
. I also have an issue on the Mac getting latex(describe(iris)) to work. I get the .tex file but this error: latex(describe(iris)) This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %-line parsing enabled. entering extended mode

Re: [R] Filling data frame data into a matrix - please help

2008-01-24 Thread Henrique Dallazuanna
Try this: d1 - data.frame(d1) d1$V3 - as.numeric(as.character(d1$V3)) xtabs(V3 ~ r1+c1, data=d1) You can substitute 0 with NA: d1.tb - xtabs(V3 ~ r1+c1, data=d1) d1.tb[d1.tb==0] - NA On 24/01/2008, Srinivas Iyyer [EMAIL PROTECTED] wrote: Dear group, I have a data.frame (d1) with various

Re: [R] Filling data frame data into a matrix - please help

2008-01-24 Thread Srinivas Iyyer
Dear Henrique, thanks for the tip. One question though: how do I get back a matrix out of d1.tb. d1.tb is an xtabs object. I tried: myres - ftable(d1.tb) myre1 - as.data.frame(myres) now myres1 is nor a matrix or a df. I want d1.tb as a matrix. Please suggest. thanks srini --- Henrique

[R] How should I organize data to compare differences in matched pairs?

2008-01-24 Thread Thomas Levine
I'm just learning how to use R right now, so I'm not sure what the most efficient way to organize these data is. I had subjects perform the same task twice with slight changes between the rounds. I want to analyze differences between the rounds. All of the subjects also answered a questionnaire.

[R] testing coeficients of glm

2008-01-24 Thread peter salzman
Dear list, i'm trying to test if a linear combination of coefficients of glm is equal to 0. For example : class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means for each level. for me, the question is how to

[R] JRI problem with R 2.6.1

2008-01-24 Thread Vladmir Makarov
Hello Members, I wonder if someone also having a problem with JRI using new R 2.6.1. To illustrate the problem, there is a simple Java driver problem below. The program runs just fine on the other computer with R 2.5.1, but does not run with R 2.6.1. It gives me no error messages either. Needles

Re: [R] Reshaping a dataframe with conditional summary of columns - apply or reshape?

2008-01-24 Thread Henrique Dallazuanna
Try this: x$survey1[x$count==0] - 0 x$survey1[x$count %in% 1:11] - 1 x$survey1[x$count 11] - 2 x.wide - reshape(x, v.names=survey1, idvar=location, timevar=survey1, direction=wide) x.wide - x.wide[order(x.wide$location),] x.wide$var1 - tapply(x$var1, x$location, mean) x.wide On 24/01/2008,

Re: [R] Filling data frame data into a matrix - please help

2008-01-24 Thread Henrique Dallazuanna
Perhaps this helps: myres - d1.tb[] attributes(myres)$call - NULL myres class(myres) If you want remove 'c1' and 'r1' then: names(dimnames(myres)) - NULL class(myres) On 24/01/2008, Srinivas Iyyer [EMAIL PROTECTED] wrote: Dear Henrique, thanks for the tip. One question though: how do I

Re: [R] How should I organize data to compare differences in matched pairs?

2008-01-24 Thread John Kane
Putting all the information in one row is going to be the easest for data entry and for analysis. If it's easier you can enter the task information in one data set and the questionnaire in another (with the same unique id ) and merge the data sets later if you need to. All you want is the data

[R] step and glm : keep all models

2008-01-24 Thread Sylvain Bertrand
Hi everyone, I'm running the following command: step(mydata.glm,directions=both,trace=T) which returns the model with the lowest AIC. Now I'd like to get the list of all the models (or at least the formulas) that were used in between. I've noticed the keep option, but couldnt find any help on

Re: [R] How should I organize data to compare differences in matchedpairs?

2008-01-24 Thread Greg Snow
Here is how I would do it (there are multiple ways you could do it, so there is not single Right answer): Assign each person a unique identifier. Put all the information from the questionaire along with the idenifier and anything else that does not change between rounds (age, sex, height, ...)

Re: [R] testing coeficients of glm

2008-01-24 Thread Prof Brian Ripley
On Thu, 24 Jan 2008, peter salzman wrote: Dear list, i'm trying to test if a linear combination of coefficients of glm is equal to 0. For example : class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means

Re: [R] step and glm : keep all models

2008-01-24 Thread Prof Brian Ripley
On Thu, 24 Jan 2008, Sylvain Bertrand wrote: Hi everyone, I'm running the following command: step(mydata.glm,directions=both,trace=T) which returns the model with the lowest AIC. Now I'd like to get the list of all the models (or at least the formulas) that were used in between. I've

[R] Error using Rmetrics to read data

2008-01-24 Thread Kerpel, John
Hi folks. This set of code used to work, but after upgrading to the latest version of Rmetrics it no longer does. Any ideas? SP500-read.table(SP500.csv,header=TRUE,sep=,) head(SP500) DateOpenHigh Low Close Volume Close2 1 8/4/2006 1280.26 1292.92 1273.82

[R] Alternating numbers in rep()

2008-01-24 Thread David Afshartous
All, I'm trying to obtain a one-liner to generate a certain sequence of alternatign numbers. Consider: unlist(rep(list(c(1,2), c(3,4)), each = 6)) [1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4 I'd like the result to be as above but continue until 38. Of course, I could hardcode this

Re: [R] testing coeficients of glm

2008-01-24 Thread peter salzman
thank you, peter On 1/24/08, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 24 Jan 2008, peter salzman wrote: Dear list, i'm trying to test if a linear combination of coefficients of glm is equal to 0. For example : class 'cl' has 3 levels (1,2,3) and 'y' is a response variable.

Re: [R] Alternating numbers in rep()

2008-01-24 Thread Charles C. Berry
This ?? as.vector( outer(0:1, rep(seq(1,37,by=2), each=6), + ) ) On Thu, 24 Jan 2008, David Afshartous wrote: All, I'm trying to obtain a one-liner to generate a certain sequence of alternatign numbers. Consider: unlist(rep(list(c(1,2), c(3,4)), each = 6)) [1] 1 2 1 2 1 2 1 2 1 2

Re: [R] Error using Rmetrics to read data

2008-01-24 Thread Henrique Dallazuanna
SP500$Date - as.character(as.Date(as.character(SP500$Date), %m/%d/%y)) SP500-as.timeSeries(SP500) On 24/01/2008, Kerpel, John [EMAIL PROTECTED] wrote: Hi folks. This set of code used to work, but after upgrading to the latest version of Rmetrics it no longer does. Any ideas?

Re: [R] Alternating numbers in rep()

2008-01-24 Thread Gabor Csardi
On Thu, Jan 24, 2008 at 03:03:22PM -0500, David Afshartous wrote: All, I'm trying to obtain a one-liner to generate a certain sequence of alternatign numbers. Consider: unlist(rep(list(c(1,2), c(3,4)), each = 6)) [1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4 I'd like the

Re: [R] two histograms in the same graph

2008-01-24 Thread Peter Dalgaard
Duncan Murdoch wrote: On 1/24/2008 9:43 AM, Juan Pablo Fededa wrote: Dear Contributors: I have two vectors x and z, and I want to display the histograms of both vectors in the same graph, x in red bars, z in blue bars. If you have any clue on how to do that, I will be very glad to hear

Re: [R] Error using Rmetrics to read data

2008-01-24 Thread Kerpel, John
But look what happens to the date field: SP500-read.table(SP500.csv,header=TRUE,sep=,) head(SP500) DateOpenHigh Low Close Volume Close2 1 8/4/2006 1280.26 1292.92 1273.82 1279.40 2530970112 1279.40 2 8/3/2006 1278.22 1283.96 1271.25 1280.27 2728440064 1280.27 3

Re: [R] Error using Rmetrics to read data

2008-01-24 Thread Henrique Dallazuanna
Yes, in the previous email that I send to you i comment this: you need the %Y SP500$Date - as.character(as.Date(as.character(SP500$Date), %m/%d/%Y)) On 24/01/2008, Kerpel, John [EMAIL PROTECTED] wrote: But look what happens to the date field: SP500-read.table(SP500.csv,header=TRUE,sep=,)

Re: [R] Alternating numbers in rep()

2008-01-24 Thread Greg Snow
Here are a couple of options (I'm sure there are plenty of others) that replicate your results and can be extended without too much more typing (but some arithmatic): unname(unlist( rep( as.data.frame( matrix(1:4, nrow=2) ) , each=6 ) )) [1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4

Re: [R] testing coeficients of glm

2008-01-24 Thread Achim Zeileis
On Thu, 24 Jan 2008, peter salzman wrote: Dear list, i'm trying to test if a linear combination of coefficients of glm is equal to 0. For example : class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means

Re: [R] Alternating numbers in rep()

2008-01-24 Thread Greg Snow
The last one can be shortened to: c(aperm(array(1:4, c(2,2,6)),c(1,3,2))) [1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4 And it extends to 38 fairly easily: c(aperm(array(1:38, c(2,38/2,6)),c(1,3,2))) [1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4 5 [26]

[R] Odp: boxplot axis labelling

2008-01-24 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 24.01.2008 18:20:41: Hi, i'm very new to R, so sorry for what i'm sure is a very basic question. I'm producing a boxplot with the data below: df3-data.frame( x=c(10,11,115,12,13,14,16,17,18,21,22,23,24,26,27,28,29,3,30,32,33,34,35,4,4

[R] Displaying trailing zeroes

2008-01-24 Thread Lucke, Joseph F
round(12.01,1) will give the answer 12, not 12.0 or even 12. To make a table look nice, I need to display the trailing zero so that just as round(12.05,1) yields 12.1, round(12.01) yields 12.0. I cannot find an answer in print() or format() or options(). Any suggestions would be appreciated.

Re: [R] Displaying trailing zeroes

2008-01-24 Thread Christos Hatzis
formatC(round(12.01), digits=1, format=f) -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lucke, Joseph F Sent: Thursday, January 24, 2008 4:37 PM To: r-help@r-project.org Subject: [R] Displaying trailing zeroes round(12.01,1) will

Re: [R] Re shaping a dataframe with conditional summary of columns - apply or reshape?

2008-01-24 Thread David Hewitt
Try this: x$survey1[x$count==0] - 0 x$survey1[x$count %in% 1:11] - 1 x$survey1[x$count 11] - 2 x.wide - reshape(x, v.names=survey1, idvar=location, timevar=survey1, direction=wide) x.wide - x.wide[order(x.wide$location),] x.wide$var1 - tapply(x$var1, x$location, mean) x.wide

Re: [R] Re shaping a dataframe with conditional summary of columns - apply or reshape?

2008-01-24 Thread David Hewitt
x$survey1[x$count==0] - 0 x$survey1[x$count %in% 1:11] - 1 x$survey1[x$count 11] - 2 x.wide - reshape(x, v.names=survey1, idvar=location, timevar=survey1, direction=wide) x.wide - x.wide[order(x.wide$location),] x.wide$var1 - tapply(x$var1, x$location, mean) x.wide Thanks a lot

[R] Grouping

2008-01-24 Thread Judith Flores
I need to group some subjects according to two variables (var1, var2) I have a data frame that looks something like this: Subject var1 var2 1 400150 2 320100 3 580600 4 145789 Each suject would fall into one of

Re: [R] Displaying trailing zeroes

2008-01-24 Thread Duncan Murdoch
On 24/01/2008 4:36 PM, Lucke, Joseph F wrote: round(12.01,1) will give the answer 12, not 12.0 or even 12. Those are all the same number. You aren't asking about the answer, you are asking about how to control how the number is printed. To make a table look nice, I need to display the

Re: [R] latex{Hmisc} cannot find xdvi on MAC OS X

2008-01-24 Thread Kevin E. Thorpe
Don MacQueen wrote: Nobody seems to have asked whether the student is using R from the Mac GUI, or R at the unix-style command line prompt. I have R 2.6.1 installed on a Mac running OS 10.4.11. When I start R at the command prompt in a terminal emulator in the X windows environment, the

Re: [R] Linux, UNIX, XP32, Vista X64 or ...? [SEC=UNCLASSIFIED]

2008-01-24 Thread Jin.Li
Hi Peter, Thank you for the quick answer. Given that we have UNIX system available here in Geoscience Australia, I am wondering if UNIX is also faster and with 64 bit build. Perhaps they may be kind enough to let me have a Linux system. As I only have experience in using Windows PC, what kind of

Re: [R] Displaying trailing zeroes

2008-01-24 Thread Peter Dalgaard
Lucke, Joseph F wrote: round(12.01,1) will give the answer 12, not 12.0 or even 12. To make a table look nice, I need to display the trailing zero so that just as round(12.05,1) yields 12.1, round(12.01) yields 12.0. I cannot find an answer in print() or format() or options(). Any

[R] package 'foreign'

2008-01-24 Thread Tobias Teichert
Hi Everybody, I need to install the R-package 'foreign'. However, when I try the standard install.packages('foreign') I get the following error message: package 'foreign' is not available in: install.packages(foreign) The funny thing is, that I am using an Ubuntu Gutsy system and the foreign

Re: [R] How should I organize data to compare differences in matchedpairs?

2008-01-24 Thread Thomas Levine
By accident, I didn't send this to the list. On Thu, 2008-01-24 at 17:54 -0500, Thomas Levine wrote: Oh, right, I don't need the differences. I only needed to get the differences before because I was doing them sloppily in a spreadsheet and needed to do a t-test manually because the program

Re: [R] Barplot w/ single stacked bar

2008-01-24 Thread hadley wickham
I can reach my goal in ggplot2, although the relative heights of the bar's pieces don't seem quite right (it does generate a warning): library(ggplot2) x-factor(1) y-factor( c(Male,Male,Female) ) mydata - data.frame(x,y) rm(x,y) mydata Ooops! There was a bug in stat_bin that occurred

  1   2   >