Re: [R] table() and setting useNA to be there by default?

2010-01-07 Thread Jim Lemon
On 01/07/2010 11:02 PM, Sean O'Riordain wrote: Good morning, Is there a way to get table() to default to including NAs - as in... table(..., useNA='ifany') or table(..., useNA='always') or table(..., exclude=NULL) ? I can't see a way under table() or options() or searching the archives (prob

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Michal Kulich
On 7.1.2010 20:22, Duncan Murdoch wrote: > A more useful example than ls() would be methods(). I think it > would be nice to have a list of methods included in the man page for > a generic function, and links to their pages if they have their own > man pages. You might want to list all installe

Re: [R] Polynomial equation

2010-01-07 Thread Moshe Olshansky
Hi Chris, Curve fitting has nothing to do with statistics (even though it is used in statistics). To get an idea of this, try the following: x <- ((-100):100)/100 cofs<-rnorm(4)#create coefficients y <- cofs[1] + cofs[2]*x + cofs[3]*x^2 +cofs[4]*x^3 y1 <- y +rnorm(201,0,0.1)#add nois

Re: [R] Is nested namespace supported?

2010-01-07 Thread Peng Yu
On Thu, Jan 7, 2010 at 11:10 AM, Peng Yu wrote: > I don't find where in the R document the discussion of nested > namespace is. If there is nested namespace supported in R, could > somebody let me know whether the document is? Could somebody let me know if there is nested name space supported? Fo

Re: [R] Print data frame as list including row/column name

2010-01-07 Thread Dennis Murphy
Let x be your dataset below. It's assumed that R1-R4 are the row names of the data frame, so we create a variable to get them into the dataset: x$row <- row.names(x) # Load the reshape package: library(reshape) xx <- melt(x, .id = 'row') # Write to a csv file sans header and row IDs: (assuming

Re: [R] Print data frame as list including row/column name

2010-01-07 Thread jim holtman
how about something like this: > x C1 C2 C3 R1 0 0 1 R2 1 0 0 R3 0 0 0 R4 0 1 0 > z <- stack(x) > z values ind 1 0 C1 2 1 C1 3 0 C1 4 0 C1 5 0 C2 6 0 C2 7 0 C2 8 1 C2 9 1 C3 10 0 C3 11 0 C3 12 0 C3 >

[R] R exponential regression

2010-01-07 Thread chrisli1223
Hi all, I have a dataset which consists of 2 columns. I'd like to plot them on a x-y scatter plot and fit an exponential trendline. I'd like R to determine the equation for the trendline and display it on the graph. Since I am new to R (and statistics), any advice on how to achieve this will be

Re: [R] Polynomial equation

2010-01-07 Thread chrisli1223
Thank you very much for your help. Greatly appreciated! However, due to my limited stats background, I am unable to find out the equation of the trendline from the summary table. Besides, how do I fit the trendline on the graph? I intend to put the first column of data onto x axis and the second

Re: [R] Polynomial equation

2010-01-07 Thread Moshe Olshansky
Hi Chris, You can use lm with poly (look ?lm, ?poly). If x and y are your arrays of points and you wish to fit a polynom of degree 4, say, enter: model <- lm(y~poly(x,4,raw=TRUE) and then summary(model) The raw=TRUE causes poly to use 1,x,x^2,x^3,... instead of orthogonal polynomials (which are

Re: [R] February 2010***New R Courses*** by XLSolutions Corp at 9 USA Cities: San Francisco, New York, Washington DC, Houston, Boston, Las Vegas, Seattle, etc

2010-01-07 Thread milton ruser
Dear Sue, Happy new your to you too. You will offer the course on R or S-Plus? If S-plus is the case, how deal with license? bests milton On Wed, Jan 6, 2010 at 3:24 PM, Sue Turner wrote: > Happy New Year ! > > XLSolutions February 2010 R courses schedule is now available online at > 9 > USA

[R] Print data frame as list including row/column name

2010-01-07 Thread sugimoto
Hi all, I have the following problem: I have a data frame (actually it is a prop.table) which I want to print as a list, e.g.: C1 C2 C3 R1 0.0 0.0 1.0 R2 1.0 0.0 0.0 R3 0.0 0.0 0.0 R4 0.0 1.0 0.0 should be printed like C1;R1;0.0 C2;R1;0.0 C3;R1;1.0 C1;R2;1.0 C2;R2

Re: [R] [Fwd: snowfall on Win7]

2010-01-07 Thread Guillaume Yziquel
Murph a écrit : Jochen Knaus wrote: . Anybody having experiences with Win7 yet? R 2.10.1 installed today on win7 works fine for this new user. Although the demos fail with a complaint about unable to "setwd"I suspect it's a privaleges problem. Win7 is awkward about install priv

[R] Polynomial equation

2010-01-07 Thread chrisli1223
Hi all, I have got a dataset. In Excel, I can fit a polynomial trend line beautifully. However, the equation that Excel calculates appear to be incorrect. So I am thinking about using R. My questions are: (1) How do I fit a polynomial trendline to a graph? (2) How do I calculate and display the

Re: [R] [Fwd: snowfall on Win7]

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 4:39 PM, Murph wrote: Jochen Knaus wrote: > > . > > Anybody having experiences with Win7 yet? > > > > R 2.10.1 installed today on win7 works fine for this new user. Although the demos fail with a complaint about unable to "setwd"I suspect it's a privaleges problem.

Re: [R] A question about the ff package

2010-01-07 Thread Jens Oehlschlägel
Peter, ff objects are not allowed as subscripts to ff objects. You can take several routes 1) use bit objects instead of logical or ff logical. This is fast and takes factor 32 less RAM than logicals (BTW bit objects can be coerced to ff via as.ff() and as.bit() but they convert to vmode "bool

Re: [R] February 2010***New R Courses*** by XLSolutions Corp at 9 USA Cities: San Francisco, New York, Washington DC, Houston, Boston, Las Vegas, Seattle, etc

2010-01-07 Thread eugene dalt
I am hoping these guys could bring these intermediate level R courses to Dallas, anyone interested in attending these courses might want to contact XLSolutions to set a center in Dallas. Pleaase. http://www.xlsolutions-corp.com/rplus.asp --- On Wed, 1/6/10, Sue Turner wrote:

Re: [R] [Fwd: snowfall on Win7]

2010-01-07 Thread Murph
Jochen Knaus wrote: > > . > > Anybody having experiences with Win7 yet? > > > > R 2.10.1 installed today on win7 works fine for this new user. Although the demos fail with a complaint about unable to "setwd"I suspect it's a privaleges problem. Win7 is awkward about install prival

Re: [R] Debugging issues encountered during the "R CMD check" process

2010-01-07 Thread Jason Rupert
Thanks a ton for the reply. If I understand your recommendation below you are saying to set "R_KEEP_PKG_SOURCE=yes" as an environment variable and then run "R CMD check signal" and hope that additional debug messages are printed. If that is the case, I believe I may have followed those instr

Re: [R] Debugging issues encountered during the "R CMD check" process

2010-01-07 Thread Uwe Ligges
Dear Jason Rupert, I would need to dig into this and cannot answer yet. But I am about to take over maintainership of the orphaned signal package and already registered an R-forge project (currently I only cleaned up some files without really fixing issues). Have you already invested some wor

Re: [R] Return values in fExtremes package

2010-01-07 Thread Tim Smith
Ah, thanks David !! That did it. For the archives: > p...@fit$par.ests mu beta -0.002109746 0.965186804 > p...@fit$par.ests[1] mu -0.002109746 From: David Scott Cc: r Sent: Thu, January 7, 2010 5:17:25 PM Subject: Re: [R] R

Re: [R] vector to diagonals

2010-01-07 Thread Stephan Kolassa
diag(c(1,2,3)) HTH Stephan Mohsen Jafarikia schrieb: Hello All: Can somebody tell me how to make a diagonal matrix from a vector please? if X is 1 2 3 I need: 1 0 0 0 2 0 0 0 3 Thanks alot, Mohsen [[alternative HTML version deleted]] _

Re: [R] vector to diagonals

2010-01-07 Thread Peter Alspach
Tena koe Mohsen Try diag(1:3) HTH ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Mohsen Jafarikia > Sent: Friday, 8 January 2010 11:11 a.m. > To: r-help@r-project.org > Subject: [R] vector to diagonals

Re: [R] Return values in fExtremes package

2010-01-07 Thread David Scott
Tim Smith wrote: Hi, I was usuing the fExtemes package, and wanted to obtain some of the values returned from the function gumbelFit(). For example, in the following code, I would like to access 'mu' and 'beta' from the object 'para'. How should I go about doing this? Is there any generic met

[R] vector to diagonals

2010-01-07 Thread Mohsen Jafarikia
> > Hello All: > > Can somebody tell me how to make a diagonal matrix from a vector please? > > if X is > 1 > 2 > 3 > > I need: > 1 0 0 > 0 2 0 > 0 0 3 > > Thanks alot, > Mohsen > [[alternative HTML version deleted]] __ R-help@r-project.org mail

Re: [R] Problem with writeBin and importing into gfortran compiled programs

2010-01-07 Thread jgarcia
Solved!! Berend's suggestion to use ACCESS='STREAM' is perfect. I've checked that it's even acepted by gfortran coming along with GCC 4.2.1 (the one I've got), and solves the problem. I was working around this through seek() and truncate(), but this is clearly the star option! Thanks Berend and D

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 2:58 PM, Kevin Wright wrote: On Thu, Jan 7, 2010 at 9:32 AM, Duncan Murdoch wrote: > On 07/01/2010 10:00 AM, Michal Kulich wrote: > >> On 7.1.2010 15:52, Duncan Murdoch wrote: >> > Not necessarily. The current help system can display information about >> > the current session, e.

Re: [R] "%d/%m/%Y" can not be displayed in a .rd file

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 2:09 PM, rusers.sh wrote: Hi all, I found the date format (e.g."%d/%m/%Y") in the .rd file cannot be displayed after building the package. See below, ###.rd file \examples{ a<-"10/20/1999" DateConversion(a,DateIn="%m/%d/%Y",DateOut="%d/%m/%Y") } The result is Examples

Re: [R] Barplot + plot same scale

2010-01-07 Thread Samuel Dennis
Forget about two separate plots overlaid on each other. You are far better off using the lines function I expect. To obtain the centres of the bars for plotting, you need to record the output of the barplot as a variable and use that in your line graph. Try the following code: midpts <- barplot(c

[R] Outlier colors in image()

2010-01-07 Thread Minho Chae
Hi all, I'd like to color outliers differently in image() function, say blue for below a threshhold value and red for above a threshold value. I was able to do this in levelplot() by using "col.regions" and "at" parameters. But for a large matrix, i.e, 8000x200, the figure is just too slim in lev

[R] A question about the ff package

2010-01-07 Thread Peter Tait
Hi, I am using version 2.1-1 of the ff package. I have a data set with 80 million rows and I need to create a new ffdf object, subseting by values in one of the original ffdf's columns. Here is my code: bigData <- read.table.ffdf(file="/data/demodata/data/smallData.txt", next.rows=1e5, head=TRUE,

[R] Barplot + plot same scale

2010-01-07 Thread Mister Vanhalen
Hello, I would like to plot : barplot(c(10,12,18)) and plot(c(0,2,3), t="l") and many other plots... in a same scale. With par(new=T) it's not align, points are not in the middle of the bar of barplot. Is there an easely solution to align that ? Thank for you help, G [[alternative

Re: [R] startup file

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 4:10 PM, mkna005 mkna005 wrote: Hi! I was wondering if it is possible to have a startup script similar to matlab as such when R starts up the script is automatically executed? Thanks Yes, see ?Startup. Duncan Murdoch __ R-help@r-proj

[R] startup file

2010-01-07 Thread mkna005 mkna005
Hi! I was wondering if it is possible to have a startup script similar to matlab as such when R starts up the script is automatically executed? Thanks Christoph __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] mean for subset

2010-01-07 Thread Jerry Floren
Thanks for your insights Matthew. Actually, some of the merged documents are over 1,000 pages. I have never had a programming class, and I had one college statistics course in 1975. I might be in over my head, but R along with Word's mail merge has allowed me to put together some pretty useful rep

Re: [R] Problem with writeBin and importing into gfortran compiled programs

2010-01-07 Thread Berend Hasselman
jgarcia-2 wrote: > > f90 part > > PROGRAM foo > INTEGER, PARAMETER :: DP = KIND(1.0D0) > INTEGER :: status > REAL(DP), DIMENSION(10,100) :: whini > OPEN(UNIT=5, FILE='fwhini.dat', STATUS='OLD', ACTION='READ', & > FORM='UNFORMATTED', IOSTAT=status) > READ(5) whini > CLOSE(5) > W

[R] Mantel results shown in a graphical (histogram) form.

2010-01-07 Thread colin1
I am new at 'R' and not even sure whether I am contacting the appropriate forum!! However, I have carried out several mantel tests (using 'R') on genetic data and would like to plot the results in the form of a histogam of the distribution - and preferably use a procedure that shows the critical '

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-07 Thread Henrik Bengtsson
No paths for shell() - instead throw it commands as if you were at the Windows command prompt, i.e. res <- shell("find", intern=TRUE); str(res); chr [1:3454] "." "./.Rhistory" "./aroma.affymetrix" ... /H 2010/1/7 Uwe Ligges : > Argh. I see it as well. Will dig a lit tomorrow. > > Uwe > > > > >

Re: [R] Identifying outliers in non-normally distributed data

2010-01-07 Thread Kevin Wright
Here is a simple function I use. It uses Median +/- 5.2 * MAD. If I recall, this flags about 1/2000 of values from a true Normal distribution. is.outlier = function (x) { # See: Davies, P.L. and Gather, U. (1993). # "The identification of multiple outliers" (with discussion) # J. Ame

[R] piecewise regression using nlme function

2010-01-07 Thread Carlson, Erik A (GE, Research)
Is a 95% CI on a breakpoint fixed effect legitimate when the nonlinear equation is continuous but not differentiable at the breakpoint? I used the nlme to generate a non-linear mixed-effects piecewise model with initial slope zero prior to an unknown breakpoint. It did give a 95% CI for the bre

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread hadley wickham
>>  I have to close all the tabs and call help to open them >> again.  Also, the R-supplied java tool for searching help is ancient and >> underwhelming. > > Then contribute a new one. And this would be pretty easy to, since you can program it in R. There are heaps of possibilities - you could use

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread hadley wickham
> What I'd really like is for someone who has good taste to redesign the look > of the whole system.  I think one or two people are working on packages to > do this, and I'd much rather spend time providing whatever low level support > they need, rather than doing it myself. Have you looked at add

[R] variance inflation factor for linear mixed effects

2010-01-07 Thread thomas t
hello all - i was searching for theoretical articles/vector equations regarding variance inflation factor (or generalization) for the linear mixed effects model (repeated measures data) sincerely, tom -- View this message in context: http://n4.nabble.com/variance-inflation-factor-for-linear-mixe

Re: [R] Help formating data to display commas

2010-01-07 Thread Anderson, Chris
I got it to work thanks Chris Anderson Data Analyst Medical Affairs wk: 925-677-4870 cell: 707-315-8486 Fax:925-677-4670 -Original Message- From: Henrique Dallazuanna [mailto:www...@gmail.com] Sent: Thursday, January 07, 2010 11:45 AM To: Anderson, Chris Cc: r-help@R-project.org Subject

Re: [R] Help formating data to display commas

2010-01-07 Thread Anderson, Chris
When I try this all I get is NULL Chris Anderson Data Analyst Medical Affairs wk: 925-677-4870 cell: 707-315-8486 Fax:925-677-4670 -Original Message- From: Henrique Dallazuanna [mailto:www...@gmail.com] Sent: Thursday, January 07, 2010 11:45 AM To: Anderson, Chris Cc: r-help@R-project.o

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Kevin Wright
On Thu, Jan 7, 2010 at 9:32 AM, Duncan Murdoch wrote: > On 07/01/2010 10:00 AM, Michal Kulich wrote: > >> On 7.1.2010 15:52, Duncan Murdoch wrote: >> > Not necessarily. The current help system can display information about >> > the current session, e.g. the result of ls(), as a simple example.

Re: [R] faster GLS code

2010-01-07 Thread Carlo Fezzi
Dear Ravi and Chuck, thanks a lot for your suggestions. I should have make it clear earlier, but unfortunately I need "betav" because this is part of a longer code to estimate a bayesian SUR tobit. Ravi, in your approach is there are way to compute "betav" as well? Also, I was aware of the model r

Re: [R] Help formating data to display commas

2010-01-07 Thread Henrique Dallazuanna
I get this: upper <- c(20, 354658, 325145) gsub("\\s", "", format(upper, big.mark = ",")) [1] "200,000" "354,658" "325,145" On Thu, Jan 7, 2010 at 5:50 PM, Anderson, Chris wrote: > When I try this all I get is NULL > > Chris Anderson > Data Analyst > Medical Affairs > wk: 925-677-4870 > ce

Re: [R] "%d/%m/%Y" can not be displayed in a .rd file

2010-01-07 Thread rusers.sh
Solved. Thanks a lot. 2010/1/7 Duncan Murdoch > On 07/01/2010 2:09 PM, rusers.sh wrote: > >> Hi all, >> I found the date format (e.g."%d/%m/%Y") in the .rd file cannot be >> displayed after building the package. See below, >> ###.rd file >> \examples{ >> a<-"10/20/1999" >> DateConversion(a,

Re: [R] "%d/%m/%Y" can not be displayed in a .rd file

2010-01-07 Thread Nutter, Benjamin
Try "\%d/\%m/\%Y" Escaping the % should do the trick. If I remember correctly, Latex uses the % as the comment delimiter. I don't know if that's the cause of the error, but escaping it has always solve the problem for me. -Original Message- From: r-help-boun...@r-project.org [mailto:r-

Re: [R] regex question on escaping "." (and a couple other regex questions as well)

2010-01-07 Thread David Winsemius
On Jan 7, 2010, at 2:47 PM, Mark Kimpel wrote: I have an example where escaping "." does not seem to be behaving consistently, but perhaps it is due to my misunderstanding. Could someone explain to me why the below produces the output it does? It seems to me that in the second example, wher

Re: [R] Debugging issues encountered during the "R CMD check" process

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 2:48 PM, Jason Rupert wrote: I read through the "Writing R Extensions" and the "Debugging in R" website (http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/), looking for some hints about how to solve the issue of debugging problems encountered during the "R CMD check" proce

[R] weight by obs # in spatial 'nest' in NLME?

2010-01-07 Thread Seth
Hi, I am constructing a series of nonlinear mixed regression models at multiple spatial scales on the same data. The data is a regular grid of cells. A coarser scale is achieved, for example, by aggregating cells in blocks that are 2x2 cells in dimension and averaging dependent and independent

[R] Debugging issues encountered during the "R CMD check" process

2010-01-07 Thread Jason Rupert
I read through the "Writing R Extensions" and the "Debugging in R" website (http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/), looking for some hints about how to solve the issue of debugging problems encountered during the "R CMD check" process, but nothing seems to be mentioned abo

[R] regex question on escaping "." (and a couple other regex questions as well)

2010-01-07 Thread Mark Kimpel
I have an example where escaping "." does not seem to be behaving consistently, but perhaps it is due to my misunderstanding. Could someone explain to me why the below produces the output it does? It seems to me that in the second example, where I am being more precise about specifying that a "."

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 2:16 PM, Kevin Wright wrote: Well, among other things, if my global environment becomes cluttered/corrupt/etc and I quit R, then restart R, the links in my browser are now dead. You weren't following Dieter's instructions, then. I have to close all the tabs and call help to ope

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-07 Thread Henrik Bengtsson
My bad, I jumped in to late in the thread and missed the fact that it does not work with Rgui.exe (and that it works with Rterm.exe). Problem replicated/remains. /H On Thu, Jan 7, 2010 at 11:10 AM, Henrik Bengtsson wrote: > No paths for shell() - instead throw it commands as if you were at the >

Re: [R] Help formating data to display commas

2010-01-07 Thread Henrique Dallazuanna
Try this: gsub("\\s", "", format(upper, big.mark = ",")) On Thu, Jan 7, 2010 at 5:31 PM, Anderson, Chris wrote: > I'm using the following code to create quartile intervals of my dataset and > it is working like it is suppose too. In my final output of the data I would > like currency amounts t

Re: [R] Problem with writeBin and importing into gfortran compiled programs

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 2:05 PM, jgar...@ija.csic.es wrote: Hi all, I'm having problems trying to export binary arrays from R and importing them into fortran (linux openSUSE 10.3 (x86_64), gfortran compiler, fortran 90/95 program). Let's say the problem can be expressed as: R part >whini <-

Re: [R] faster GLS code

2010-01-07 Thread Charles C. Berry
On Thu, 7 Jan 2010, Ravi Varadhan wrote: Try this: X <- kronecker(diag(1,3),x) Y <- c(y) # stack the y in a vector # residual covariance matrix for each observation covar <- kronecker(sigma,diag(1,N)) csig <- chol2inv(covar) betam2 <- ginv(csig %*% X) %*% csig %*% Y This is more than 2 time

Re: [R] Drop a part of an array\list\vector?

2010-01-07 Thread David Winsemius
On Jan 7, 2010, at 1:15 PM, Idgarad wrote: I did have a verbose description of why but rather then make everyone's eyes bleed with useless details I ask the following :) To make a long story short: How can I make newmcReg[[i]]["PreIO308"] go away in the following list... er vector... no wai

[R] "%d/%m/%Y" can not be displayed in a .rd file

2010-01-07 Thread rusers.sh
Hi all, I found the date format (e.g."%d/%m/%Y") in the .rd file cannot be displayed after building the package. See below, ###.rd file \examples{ a<-"10/20/1999" DateConversion(a,DateIn="%m/%d/%Y",DateOut="%d/%m/%Y") } The result is Examples: a<-"10-20-1999" DateConversion

[R] Help formating data to display commas

2010-01-07 Thread Anderson, Chris
I'm using the following code to create quartile intervals of my dataset and it is working like it is suppose too. In my final output of the data I would like currency amounts to be displayed with commas. I have not found an option either through FormatC or sprintf that will display the data with

[R] LD50 and SE in GLMM (lmer)

2010-01-07 Thread Linda Bürgi
Hi All! I am desperately needing some help figuring out how to calculate LD50 with a GLMM (probit link) or, more importantly, the standard error of the LD50. I conducted a cold temperature experiment and am trying to assess after how long 50% of the insects had died (I had 3 different i

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Kevin Wright
Well, among other things, if my global environment becomes cluttered/corrupt/etc and I quit R, then restart R, the links in my browser are now dead. I have to close all the tabs and call help to open them again. Also, the R-supplied java tool for searching help is ancient and underwhelming. A de

Re: [R] faster GLS code

2010-01-07 Thread Ravi Varadhan
Try this: X <- kronecker(diag(1,3),x) Y <- c(y) # stack the y in a vector # residual covariance matrix for each observation covar <- kronecker(sigma,diag(1,N)) csig <- chol2inv(covar) betam2 <- ginv(csig %*% X) %*% csig %*% Y This is more than 2 times faster than your code (however, it doesn't

Re: [R] Generating data from Null Distribution

2010-01-07 Thread Greg Snow
Just randomly permute one of your columns (see ?sample) of the raw data (before using the table function to get the table). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-pr

[R] Problem with writeBin and importing into gfortran compiled programs

2010-01-07 Thread jgarcia
Hi all, I'm having problems trying to export binary arrays from R and importing them into fortran (linux openSUSE 10.3 (x86_64), gfortran compiler, fortran 90/95 program). Let's say the problem can be expressed as: R part >whini <- runif(1000) >writeBin(whini,"fwhini.dat") f90 part

Re: [R] Simple averaging question

2010-01-07 Thread Ista Zahn
Assuming the data frame is named "X": mean(X[c(5,8), "Time"]) See ?'[' for details. -Ista On Thu, Jan 7, 2010 at 1:20 PM, lse1986 wrote: > > I have the following data: > > http://i.imagehost.org/0650/Untitled2.jpg > > How would i average, say the 5th and the 8th entries? > Thanks in advance >

Re: [R] mean for subset

2010-01-07 Thread Matthew Dowle
Did you really say you're using Word's mail merge to construct "hundreds" of pages of R code which you then paste in to R ? It sounds like you just missed somehow how to create a function in R. Did you fully read the book Introduction to R ? Did you know R can read xls directly, and connect t

[R] Simple averaging question

2010-01-07 Thread lse1986
I have the following data: http://i.imagehost.org/0650/Untitled2.jpg How would i average, say the 5th and the 8th entries? Thanks in advance -- View this message in context: http://n4.nabble.com/Simple-averaging-question-tp1009086p1009086.html Sent from the R help mailing list archive at Nabbl

[R] how to read script name in littler

2010-01-07 Thread Fabrizio Pollastri
Hello, I am using littler to run my R code and I was looking for a way to read the running script name, but neither "argv" nor "commandArgs()" give me this information. Any suggestion? Thanks in advance. F. Pollastri __ R-help@r-project.org mailing

Re: [R] How to report or correct translations typos?

2010-01-07 Thread Pablo Emilio Verde
Dear Duncan, Thank you for clarifying this issue. Cheers, Pablo - Original Message - From: "Duncan Murdoch" To: "Kenneth Roy Cabrera Torres" Cc: ; Sent: Thursday, January 07, 2010 3:12 PM Subject: Re: [R] How to report or correct translations typos? > On 07/01/2010 9:04 AM, Kennet

Re: [R] factor graphics with pca in R?

2010-01-07 Thread Greg Hirson
Take a look at the FactoMineR and vegan packages. They may contain what you are looking for. Greg On 1/7/10 9:26 AM, Martin Ivanov wrote: Dear R users, I need to know whether the factor graphics with principal component analysis are implemented in R. I mean the graphs where the variables ar

Re: [R] Calling FING.EXE under RGui.EXE for windows.

2010-01-07 Thread Uwe Ligges
Argh. I see it as well. Will dig a lit tomorrow. Uwe On 07.01.2010 12:25, Gabor Grothendieck wrote: I get a problem with shell too: Under Rgui: R.version.string [1] "R version 2.10.1 Patched (2010-01-01 r50884)" system("C:\\windows\\system32\\find /?", intern = TRUE) character(0) s

Re: [R] Question on Reduce + rollmean

2010-01-07 Thread Muhammad Rahiz
Yes, should be 1. out[[i]], instead of t[[i]]. 2. x1[c(i:(i+1))] # For this case, I was trying out the rolling sum. Muhammad Rahiz | Doctoral Student in Regional Climate Modeling Climate Research Laboratory, School of Geography & the Environment Oxfor

[R] Return values in fExtremes package

2010-01-07 Thread Tim Smith
Hi, I was usuing the fExtemes package, and wanted to obtain some of the values returned from the function gumbelFit(). For example, in the following code, I would like to access 'mu' and 'beta' from the object 'para'. How should I go about doing this? Is there any generic method to access the o

Re: [R] Question on Reduce + rollmean

2010-01-07 Thread Gabor Grothendieck
That gives an error when I run it. I think you want this: m <- matrix(1:3,3,3) x1 <- list(m, m+1, m+2, m+3, m+4) out <- list() for(i in 1:4) out[[i]] <- (x1[[i]] + x1[[i+1]]) / 2 On Thu, Jan 7, 2010 at 12:28 PM, Muhammad Rahiz wrote: > Dear Gabor & Henrique, > > Thanks for your suggestions on

[R] Drop a part of an array\list\vector?

2010-01-07 Thread Idgarad
I did have a verbose description of why but rather then make everyone's eyes bleed with useless details I ask the following :) To make a long story short: How can I make newmcReg[[i]]["PreIO308"] go away in the following list... er vector... no wait array dataframe awww crap... summary(

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 11:36 AM, Jonathan Baron wrote: For what it is worth, I would gladly sacrifice this capability in order to be able to consult all my R help pages through a Firefox bookmark to the packages listing (which is what I used to do, and will do again, when I get time to either rebuild from

Re: [R] [R-pkgs] fortunes: 250th fortune

2010-01-07 Thread baptiste auguie
Hi, Thank you for this fun package. I recently posted a related question on R-help that seemed to pass unnoticed. Basically, I suggested that the functionality of fortunes could be extended to R FAQ entries, also allowing contributed packages to provide their own (fortune or) faq data file. My ini

Re: [R] logistic regression based on principle component analysis

2010-01-07 Thread SR Millis
Frank Harrell, Jr shows you how to implement this in R, in his book, Regression Modeling Strategies. ~~~ Scott R Millis, PhD, ABPP (CN,CL,RP), CStat, CSci Professor & Director of Research Dept of Physical Medicine & Rehabilitation Dept of Emergency Medicine Wayne State University School

Re: [R] Question on Reduce + rollmean

2010-01-07 Thread Muhammad Rahiz
Dear Gabor & Henrique, Thanks for your suggestions on the above problem. The following is more traditional and unfanciful but it works. Suitable for a prodige like myself... m <- matrix(1:3,3,3) x1 <- list(m, m+1, m+2, m+3, m+4) out <- list() for (i in 1:4){ t[[i]] <- Reduce("+", x1[c(i:i+1)

Re: [R] logistic regression based on principle component analysis

2010-01-07 Thread Kjetil Halvorsen
for an alternative (lasso) approach, look at the packages (CRAN) grpreg, grplasso, glmnet, penalized and certainly some others. Kjetil B H On Thu, Jan 7, 2010 at 2:06 PM, Steve Lianoglou wrote: > Hi, > > On Thu, Jan 7, 2010 at 11:57 AM, 江文恺 wrote: >> >> Dear all: >> >> I try to analyse a datas

[R] factor graphics with pca in R?

2010-01-07 Thread Martin Ivanov
Dear R users, I need to know whether the factor graphics with principal component analysis are implemented in R. I mean the graphs where the variables are represented in a correlation circle, as described in more detail in this document: http://www.unesco.org/webworld/idams/advguide/Chapt6_4_3

Re: [R] Strange behaviour of as.integer()

2010-01-07 Thread William Dunlap
Use round(), floor(), or ceiling() to convert numbers with possible fractional parts to numbers without fraction parts. as.integer()'s main use is to convert from one internal representation (i.e., bit pattern) of a number to another so you can interface to C or Fortran code. Note that as.integer

[R] faster GLS code

2010-01-07 Thread Carlo Fezzi
Dear helpers, I wrote a code which estimates a multi-equation model with generalized least squares (GLS). I can use GLS because I know the covariance matrix of the residuals a priori. However, it is a bit slow and I wonder if anybody would be able to point out a way to make it faster (it is part o

[R] Is nested namespace supported?

2010-01-07 Thread Peng Yu
I don't find where in the R document the discussion of nested namespace is. If there is nested namespace supported in R, could somebody let me know whether the document is? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] logistic regression based on principle component analysis

2010-01-07 Thread Steve Lianoglou
Hi, On Thu, Jan 7, 2010 at 11:57 AM, 江文恺 wrote: > > Dear all: > > I try to analyse a dataset which contain one binary response variable and > serveral predict variables, but multiple colinear problem exists in my > dataset, some paper suggest that logistic regression for principle components >

[R] logistic regression based on principle component analysis

2010-01-07 Thread 江文恺
Dear all: I try to analyse a dataset which contain one binary response variable and serveral predict variables, but multiple colinear problem exists in my dataset, some paper suggest that logistic regression for principle components is suit for these noise data, but i only find R can done prin

Re: [R] Graph titles from massive

2010-01-07 Thread David Winsemius
On Jan 7, 2010, at 11:24 AM, Trafim Vanishek wrote: Dear all, I would like to ask you if there is a possibility in R to give the names to graphs which are not const. For example, How to name each plot, or to add notes like a=x[i], b=y[i] in this cycle x<-c(1,2,3,4,5,6) y<-c(7,8,9,10,11

Re: [R] Patterns in histogram

2010-01-07 Thread David Winsemius
On Jan 7, 2010, at 10:42 AM, dbeest wrote: I’ve been busy making some histograms and I would like to distinguish different groups. I’ve been doing it like this: a <- c(1,1,1,1,2,2,2) hist(a,breaks=c(0,1,2)) hist(a[3:5],breaks=c(0,1,2),col="red",add=TRUE) Basically plotting them over each oth

Re: [R] Graph titles from massive

2010-01-07 Thread jim holtman
use the 'main' parameter: for (i in 1:6){ plot(x,y,main=paste("Plot:", i)) } On Thu, Jan 7, 2010 at 11:24 AM, Trafim Vanishek wrote: > Dear all, > > I would like to ask you if there is a possibility in R to give the names to > graphs which are not const. > For example, > > How to name each p

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Jonathan Baron
For what it is worth, I would gladly sacrifice this capability in order to be able to consult all my R help pages through a Firefox bookmark to the packages listing (which is what I used to do, and will do again, when I get time to either rebuild from source or get the forthcoming Fedora RPM, which

[R] Graph titles from massive

2010-01-07 Thread Trafim Vanishek
Dear all, I would like to ask you if there is a possibility in R to give the names to graphs which are not const. For example, How to name each plot, or to add notes like a=x[i], b=y[i] in this cycle x<-c(1,2,3,4,5,6) y<-c(7,8,9,10,11,12) par(mfrow=c(2,3)) for (i in 1:6){ plot(x,y) } Thank y

[R] Patterns in histogram

2010-01-07 Thread dbeest
I’ve been busy making some histograms and I would like to distinguish different groups. I’ve been doing it like this: a <- c(1,1,1,1,2,2,2) hist(a,breaks=c(0,1,2)) hist(a[3:5],breaks=c(0,1,2),col="red",add=TRUE) Basically plotting them over each other, I assume there is a better way…Anyway what

Re: [R] Identifying outliers in non-normally distributed data

2010-01-07 Thread Jerry Floren
Thank you Bert and Steve for your insights and suggestions. Bert, your suggestion to meet with a professional statician is right on. We have collected some great data since 2003, but I need professional help. I am sure some recommendations could be made to improve the laboratory methods based on t

Re: [R] Building static HTML help pages in R 2.10.x on Windows

2010-01-07 Thread Duncan Murdoch
On 07/01/2010 10:00 AM, Michal Kulich wrote: On 7.1.2010 15:52, Duncan Murdoch wrote: > Not necessarily. The current help system can display information about > the current session, e.g. the result of ls(), as a simple example. But > if you use a single background session you won't get relevant

Re: [R] mean for subset

2010-01-07 Thread Jerry Floren
As a novice R user, I face a similar challenge. I am almost afraid to share with this group how I solved it. About 65 labs in our proficiency program submit data on individual Excel spreadsheets with triple replicates. There always are a few labs that do not complete the full set of three replicat

[R] building a neural network on a unbalanced data set on R

2010-01-07 Thread Enrico Giorgi
Hello everybody, I work in a production plant as an operations analyst. I have been using R for two years, starting with my final dissertation project at college. We have the following problem in our plant. At the end of the production process, each joint (that is what we produce) must p

Re: [R] Strange behaviour of as.integer()

2010-01-07 Thread Magnus Torfason
There have been some really great responses to this question. I would like to make a minor contribution by throwing the 'gmp' package into the mix. On 1/7/2010 8:12 AM, Duncan Murdoch wrote: On 07/01/2010 7:31 AM, Ulrich Keller wrote: as.integer(.57 * 100) [1] 56 Yes, as the man page state

  1   2   >