Re: [R] Advice needed on awkward tables

2010-05-10 Thread Jeff Newmiller
Greg Orm wrote: Dear r-help list members, I am quite new to R, and hope to seek advice from you about a problem I have been cracking my head over. Apologies if this seems like a simple problem. I would not call it exactly simple... but mostly because your data representation is so obscure.

Re: [R] make: Nothing to be done for `all'.

2010-05-10 Thread Romain Francois
Le 11/05/10 04:16, Elizabeth Lawson a écrit : Hi, I just bought new macbook pro 10.6.3. I am trying to use some old c code that used to work. I tried to recompile the code. In the directory with code I used R CMD SHLIB hello.c and get the error make: Nothing to be done for `all'. I have t

Re: [R] Robust SE & Heteroskedasticity-consistent estimation

2010-05-10 Thread Arne Henningsen
On 11 May 2010 00:52, Achim Zeileis wrote: > On Mon, 10 May 2010, RATIARISON Eric wrote: >> I'm using maxlik with functions specified (L, his gradient & hessian). >> >> Now I would like determine some robust standard errors of my estimators. >> >> So I 'm try to use vcovHC, or hccm or robcov for e

Re: [R] Advice needed on awkward tables

2010-05-10 Thread Greg Orm
Apologies. Let me clarify. I have included my code below : data.table.b represents the medical nomenclature, whereas data.table.a is a patient derived database. data.table.b$CATEGORY categorizes features (e.g. 'cardiac', 'respiratory'), whereas data.table.b$FEATURE is a corresponding disease (e.g

Re: [R] Panel data with binary dependent variable

2010-05-10 Thread yves croissant
To my knowledge, fixed and random effect models may be estimated for the logit model and only the random effect model for the probit model (because of the incidental parameter problem). I think clogit in the survival package fits the model that is called the fixed effect logit model in the econome

Re: [R] Advice needed on awkward tables

2010-05-10 Thread Daniel Malter
Hi, even after rereading, I have little of a clue what it is exactly that you are trying to do. It'd help if you provided a more concise, step-by-step description and/or the smallest unambiguous example of the two tables AND of what should come out at the end. Also, unless for relatively trivial p

Re: [R] Regressions with fixed-effect in R

2010-05-10 Thread Daniel Malter
There is the plm package for linear panel models. Further, since estimation of fixed effects models rests on the within-subject or -object variance, the R-squared of interest is typically the within R-squared, not the overall or between R-squared. Read up about it before you use it though. Daniel

Re: [R] kernel density to smooth plots

2010-05-10 Thread Dennis Murphy
Hi: Perhaps this will do; the data were read into a data.frame object named xx. # Melt the data - constructs a factor 'variable' whose levels are the variable names # and a numeric variable named 'value' containing, oddly enough, the numeric values. # Requires package reshape. library(reshape) l

Re: [R] plotting data when all you have is the summary data

2010-05-10 Thread Sam Albers
Bimal, in the "memisc" packages: ?panel.errbars This might be a good option for you. HTH, Sam -- View this message in context: http://r.789695.n4.nabble.com/plotting-data-when-all-you-have-is-the-summary-data-tp2173026p2173303.html Sent from the R help mailing list archive at Nabble.com. _

[R] What is happening with SQLite and R integration

2010-05-10 Thread Matt Young
Who is working on it, using it etc. I use both. -- View this message in context: http://r.789695.n4.nabble.com/What-is-happening-with-SQLite-and-R-integration-tp2173219p2173219.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

[R] Regressions with fixed-effect in R

2010-05-10 Thread chen jia
Hi there, Maybe people who know both R and econometrics will be able to answer my questions. I want to run panel regressions in R with fixed-effect. I know two ways to do it. First, I can include factor(grouping_variable) in my regression equation. Second, I plan to subtract group mean from my va

[R] make: Nothing to be done for `all'.

2010-05-10 Thread Elizabeth Lawson
Hi, I just bought new macbook pro 10.6.3. I am trying to use some old c code that used to work. I tried to recompile the code. In the directory with code I used R CMD SHLIB hello.c and get the error make: Nothing to be done for `all'. I have tried reinstalling Xcode and R but I am still hav

[R] dbSendQuery with R variables

2010-05-10 Thread Jonathan Greenberg
Rhelpers: I'd like to modify this RSQLite statement: rs_stations<-dbSendQuery(con_stations, "select * from stations") so that stations is actually an R variable, e.g.: stations=c("stationA","stationB") How would I modify the above statement to query from stations[[1]] (aka "stationA")? --j _

Re: [R] Count cases in a list

2010-05-10 Thread Sebastian Kruk
I would like to obtain a matrix 2010/5/8 Tal Galili : > Here is one way for doing that: > nombreL <- c("Alvaro Perez", "Sebastian García","Sebastian 2", "Luis Gomez", > "Jorge Rial", "Ronaldo Apud", "Ana María Bianco") > nombreC <- c("Alvaro", "Ana","Jorge","Ronaldo", "Sebastian") > func1 <- funct

[R] Advice needed on awkward tables

2010-05-10 Thread Greg Orm
Dear r-help list members, I am quite new to R, and hope to seek advice from you about a problem I have been cracking my head over. Apologies if this seems like a simple problem. I have essentially two tables. The first (Table A) is a standard patient clinicopathological data table, where rows cor

[R] kernel density to smooth plots

2010-05-10 Thread Roslina Zakaria
Hi r-sers, I have a data of relative frequencies for the interval of 0-20, 20-40,...380-400.  I would like the two data on the same graph using the same x-axis label.  My question is how to get a smooth curve using kernel density code if it possible for this data.   > cbind(rel_obs,rel_gen)    

Re: [R] Help with Names

2010-05-10 Thread Ravi Ramaswamy
There is definitely a difference. The pcr program is Principal Component Regression, but document says "The formula argument should be a symbolic formula of the form response ~ terms, where response is the name of the response vector or matrix (for multi-response models) and terms is the name of

Re: [R] Help with Names

2010-05-10 Thread jim holtman
You need to provide an 'str(yarn)' so we can see what the structure is. I don't know what the 'pcr' program is expecting, but it looks like from what you have provided that 'yarn' might be a dataframe and "X" is a vector. Look at the documentation for pcr and see what it expects. On Mon, May 10,

Re: [R] Help with Names

2010-05-10 Thread Ravi Ramaswamy
Jim - thanks. It worked, however pcr program is still not accepting it there is a sample yarn data loaded and I am comparing. My data looks like this X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 1K

Re: [R] Help with Names

2010-05-10 Thread jim holtman
Is this what you want: > x <- paste("X", 1:10, sep='') > x [1] "X1" "X2" "X3" "X4" "X5" "X6" "X7" "X8" "X9" "X10" > sub("X", "X.", x) [1] "X.1" "X.2" "X.3" "X.4" "X.5" "X.6" "X.7" "X.8" "X.9" "X.10" > On Mon, May 10, 2010 at 8:53 PM, Ravi Ramaswamy wrote: > Hi - a newbie qu

[R] Help with Names

2010-05-10 Thread Ravi Ramaswamy
Hi - a newbie question, if someone can please help I want to change X1, X2,,.to X.1 X.2 etc in the names below. I am using the Principal Component Regression function (pcr) and it seems to want it this way > datap3.pcr <- pcr(water ~ X, 10, data = datap3, Validation ="cv") Error in mode

Re: [R] ggplot: Trouble with xlim() and discrete scales

2010-05-10 Thread John Rauser
May I ask for further illumination of my dumbness? I had been merrily plotting ..density.. and using xlim() to constrain the x-axis like this and everything was working fine: df<-data.frame(names=c("Bob","Mary","Joe","Bob","Bob")) ggplot(df,aes(names,..density..,group=1))+geom_histogram()+xlim("B

Re: [R] ggplot: Trouble with xlim() and discrete scales

2010-05-10 Thread David Winsemius
On May 10, 2010, at 7:36 PM, John Rauser wrote: I'm learning ggplot and am a little confused. Sometimes discrete scales work like I'd expect, and sometimes they don't. For example... This works exactly like one would expect: df<-data.frame(names=c("Bob","Mary","Joe","Bob","Bob")) ggplot(df

[R] ggplot: Trouble with xlim() and discrete scales

2010-05-10 Thread John Rauser
I'm learning ggplot and am a little confused. Sometimes discrete scales work like I'd expect, and sometimes they don't. For example... This works exactly like one would expect: df<-data.frame(names=c("Bob","Mary","Joe","Bob","Bob")) ggplot(df,aes(names))+geom_histogram() But this yields an erro

Re: [R] R algorithm/package for creating spatial autocorrelation of uniformly distributed landscape values

2010-05-10 Thread David Winsemius
On May 10, 2010, at 4:54 PM, Laura S wrote: Dear all: I would like to create a landscape of environmental values that follow a uniform frequency distribution and also have spatial autocorrelation in the landscape. Perhaps: X <- distribution on one dimension Y <- distribution on another

Re: [R] System neutral Daylight Savings Time response?

2010-05-10 Thread Gabor Grothendieck
Perhaps you should be using the chron package. It has no time zones in the first place. On Mon, May 10, 2010 at 2:26 PM, Garrett Grolemund wrote: > I'm searching for an r command that will notify me if I create a time that > does not exist due to Daylight Savings Time. For example, if I run the

Re: [R] Robust SE & Heteroskedasticity-consistent estimation

2010-05-10 Thread Achim Zeileis
On Mon, 10 May 2010, RATIARISON Eric wrote: Hi, I'm using maxlik with functions specified (L, his gradient & hessian). Now I would like determine some robust standard errors of my estimators. So I 'm try to use vcovHC, or hccm or robcov for example but in use one of them with my result of ma

Re: [R] plotting data when all you have is the summary data

2010-05-10 Thread David Winsemius
On May 10, 2010, at 6:17 PM, Chaudhari, Bimal wrote: Are there functions/packages which support plots (bar and/or line) where I provide the point estimate and some error measure rather than the raw data? I often have to summarize/present data from multiple sources where the original data i

Re: [R] cex.axis on levelplot

2010-05-10 Thread David Winsemius
On May 10, 2010, at 4:29 PM, vjaneiro wrote: I'm trying to use cex.axis or something like this to augment the size labels' on levelplot axis, but it doesn't work. Could someone help me? Look at the thread "Re: [R] Increasing the font size on axes in trellis" from two days ago. -- D

Re: [R] predict() without generating the model within R

2010-05-10 Thread Duncan Murdoch
On 10/05/2010 6:13 PM, Chaudhari, Bimal wrote: Is there a predict method/syntax which I could use to generate predictions (and other output from predict() methods) if I have the model parameter estimates from a training dataset but not the data used to generate the original model (the models were

[R] plotting data when all you have is the summary data

2010-05-10 Thread Chaudhari, Bimal
Are there functions/packages which support plots (bar and/or line) where I provide the point estimate and some error measure rather than the raw data? I often have to summarize/present data from multiple sources where the original data is unavailable and do not yet have a good solution for this.

[R] predict() without generating the model within R

2010-05-10 Thread Chaudhari, Bimal
Is there a predict method/syntax which I could use to generate predictions (and other output from predict() methods) if I have the model parameter estimates from a training dataset but not the data used to generate the original model (the models were generated by a collaborator using STATA and for

[R] cex.axis on levelplot

2010-05-10 Thread vjaneiro
I'm trying to use cex.axis or something like this to augment the size labels' on levelplot axis, but it doesn't work. Could someone help me? -- View this message in context: http://r.789695.n4.nabble.com/cex-axis-on-levelplot-tp2172879p2172879.html Sent from the R help mailing list archive at

[R] Robust SE & Heteroskedasticity-consistent estimation

2010-05-10 Thread RATIARISON Eric
Hi, I'm using maxlik with functions specified (L, his gradient & hessian). Now I would like determine some robust standard errors of my estimators. So I 'm try to use vcovHC, or hccm or robcov for example but in use one of them with my result of maxlik, I've a the following error message :

Re: [R] Dataframe horizontal scrolling

2010-05-10 Thread Emmanuel Charpentier
under Unix/X11 (and IIRC under Windows), edit(some.data.frame) will invoke a smallish spreadsheet-like data editor, which will allow you to move around your data with no fuss. I probably wouldn't use it for any serious data entry, but found damn useful in a lot of data-debugging situations (you kno

Re: [R] [Fwd: Re: Plotting log-axis with the exponential base to

2010-05-10 Thread Ted Harding
Elisabeth, question to you: How is it that you recognise that it is "a logaritmic axis with the base of 10", as opposed to any other base? Ted. On 10-May-10 17:15:04, Elisabeth Bjerke Rastad wrote: > Hello! > Thank you for answering! > What I am trying to do is to plot my raw values (biomass of di

Re: [R] cumsum output

2010-05-10 Thread Felipe Carrillo
I realized that after I hit the send button...I was looking at the wrong dataset,Brr   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA > >From: jim holtman >To: Felipe Carrillo >Cc: r-h...@stat.math.ethz.ch >Sent: M

Re: [R] cumsum output

2010-05-10 Thread jim holtman
It is working correctly, You have NAs in your data, so you get NAs in the cumsum. On Mon, May 10, 2010 at 5:09 PM, Felipe Carrillo wrote: > Hi: Thanks to Dennis and Fernando for your help reordering the levels. > Now I have a different issue: > I am trying to get the cumulative weekly values usi

Re: [R] Corrupt R installation?

2010-05-10 Thread David Winsemius
On May 10, 2010, at 4:46 PM, Ralf B wrote: I installed the lattice package, and got an error that R was not able to remove the previous version of lattice. Now my installation seems to be currupt, even affecting other packages. I am getting this error when loading TTR: library(TTR) Loading r

[R] cumsum output

2010-05-10 Thread Felipe Carrillo
Hi: Thanks to Dennis and Fernando for your help reordering the levels. Now I have a different issue: I am trying to get the cumulative weekly values using cumsum and it appears to output the wrong values. Here's my dataset: winter <-  structure(list(week = c(26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L

Re: [R] Dataframe horizontal scrolling

2010-05-10 Thread Erik Iverson
Perhaps even ?View would be useful here. I've never used R Commander, so don't know it would be useful in that environment. Michael H wrote: R experts, I am working with large multivariable data frames (> 50 variables) and I would like to scroll horizontally across my output to view each d

[R] R algorithm/package for creating spatial autocorrelation of uniformly distributed landscape values

2010-05-10 Thread Laura S
Dear all: I would like to create a landscape of environmental values that follow a uniform frequency distribution and also have spatial autocorrelation in the landscape. I was wondering if there is an algorithm and/or package out there that creates autocorrelation of values that are distributed ac

[R] Corrupt R installation?

2010-05-10 Thread Ralf B
I installed the lattice package, and got an error that R was not able to remove the previous version of lattice. Now my installation seems to be currupt, even affecting other packages. I am getting this error when loading TTR: > library(TTR) Loading required package: xts Loading required package:

Re: [R] Dataframe horizontal scrolling

2010-05-10 Thread Ista Zahn
Hi Mike, You can set options(width = x), where x equals the number of columns. -Ista On Monday 10 May 2010 16:06:54 Michael H wrote: > R experts, > > I am working with large multivariable data frames (> 50 variables) > and I would like to scroll horizontally across my output > to view each data

[R] step function

2010-05-10 Thread Kim Jung Hwa
Hi All I need some help with plotting a step function, currently I'm using sfun <- stepfun(c(1, 2, 5,10, 20), c(0, 11, 22, 33, 44, 0), f=0) plot(sfun, pch=NA, main="", xlim=c(1,20)) which I working fine, but my data is in the following format: Min Max Value 1 2 11 2 5 22 510 33 10 20 44 1. To

Re: [R] Supercripting text

2010-05-10 Thread Shang Gao
I tried writing that function before, but the expression() command is not preserved when we incorporate it into a function(). The first example you gave me, if run in R, produced a title that reads "title" instead of "stuff". It seems that in this case the expression() can't read the character s

[R] Dataframe horizontal scrolling

2010-05-10 Thread Michael H
R experts, I am working with large multivariable data frames (> 50 variables) and I would like to scroll horizontally across my output to view each data frame rather than having to scroll down vertically- wrapped data frames.I have been using R Commander as a programming interface. If I assign

[R] Polylogarithm

2010-05-10 Thread Jue (Andy) Wang
I am writing to ask if R has a build- in function to calculate this polylogarithm Li_n(z) function , also known as the Jonquière's function defined as Li_n(z)=sum_(k=1)^infty(z^k)/(k^n) Thanks Andy __ R-help@r-project.org mailing list https://stat.et

Re: [R] dot plot with error bands

2010-05-10 Thread Alexey Bessudnov
Many thanks for this suggestion. Indeed, "labels" turned out to be a factor, and after reordering the levels I got the plot I wanted. Alexey David Winsemius wrote: On May 10, 2010, at 10:00 AM, Alexey Bessudnov wrote: Dear all, I'm trying to create a dot plot with error bands with Dotplo

Re: [R] Using R with screenreading software

2010-05-10 Thread Roopakshi Pathania
Hi, I use R with a screen reader to do statistical and financial analysis. There are a couple of things that your student can do. R was created on Linux, and then ported to Windows. So she can use R under Linux where the CLI is perfectly accessible. There are 2 main screen readers for Linux:

Re: [R] Supercripting text

2010-05-10 Thread Kevin Coombes
Sigh; that's because I forget to include it in the 'substitute' list. Here is a version that works (and has been tested...). ourtitle <- function(title, footnotes=NULL) { if (length(footnotes) > 0) { fn <- paste(footnotes, collapse=' ') title <- eval(substitute(expression(bold(paste(titl

[R] Bug in DEMA (Moving Average smoothing algoritm) ?

2010-05-10 Thread Ralf B
When running DEMA(data, 5) on a vector 'data' of length 5, my R engine stops. Is this function or the R environment facing a bug here or am I doing something wrong? DEMA should work if the smoothing window size is the same size as the the data length, right? (I am working with Eclipse 3.5. and the

Re: [R] graphics::plot Organizing line types, line colors and generating matching legends...

2010-05-10 Thread baptiste auguie
Hi, Lattice and ggplot2 are both ideally suited for this task. Consider this example, library(ggplot2) d = data.frame(x=1:10, a1=rnorm(10), b1=rnorm(10)) m = melt(d, id ="x") # reshape into long format qplot(x, value, data=m, geom="path", colour=variable) library(lattice) xyplot(value~x, data=m

[R] graphics::plot Organizing line types, line colors and generating matching legends...

2010-05-10 Thread Ralf B
Lets say I have a generated data frame with variables that follow a naming convention: title,a1,a2,b1,b2,b3,c1,c2,c3,c4... I am plotting every column (starting from a1) as a line in a plot. That works. However my diagram becomes very unorganized. Creating legends is nice, but trying out different

Re: [R] Dimensions on svychisq on svydesign

2010-05-10 Thread Thomas Lumley
I think your problem is that HL07 is not a data frame but a list. read.spss() produces a list rather than a data frame by default, and svydesign() requires a data frame. You can use as.data.frame() to turn HL07 into a data.frame. The weights also look a bit strange -- you have sampling prob

Re: [R] Random walk

2010-05-10 Thread David Winsemius
On May 10, 2010, at 2:55 PM, Sergio Andrés Estay Cabrera wrote: Dear R users and specially Albyn and Giovanni, thanks for your answers, but in fact I supposed the same at the beginning of my problem. However, when I generate the data seldom I obtain the expected correlation. For example us

Re: [R] Supercripting text

2010-05-10 Thread Kevin Coombes
You probably want to write your own titling function to add superscripts. The following code will serve as a reasonable starting point: # make the title expression ourtitle <- function(title, footnotes=NULL) { if (length(footnotes) > 0) { fn <- paste(footnotes, collapse=' ') title <- eva

Re: [R] Random walk

2010-05-10 Thread Sergio Andrés Estay Cabrera
Dear R users and specially Albyn and Giovanni, thanks for your answers, but in fact I supposed the same at the beginning of my problem. However, when I generate the data seldom I obtain the expected correlation. For example using this code: fz<-function(n,t,rho){ f<-NULL for(i in 1:n){ s<-rmv

Re: [R] Plotting log-axis with the exponential base to a plot with the default logarithm base 10

2010-05-10 Thread Xianwen Chen
Dear Elisabeth, log(X) shall return logarithm of X, with the base of e. If you are not sure, you can specify e to be the base, e.g.: log(X,exp(1)) . Snow in Tromsø is melting, so will your problem. King regards,

[R] System neutral Daylight Savings Time response?

2010-05-10 Thread Garrett Grolemund
I'm searching for an r command that will notify me if I create a time that does not exist due to Daylight Savings Time. For example, if I run the following command on a windows machine > ISOdatetime(2010,03,14,2,10,0, tz = "") # My system time is set to the United States Central Time Zone [1] NA

[R] Supercripting text

2010-05-10 Thread Shang Gao
Dear R users, I recently developed a plotting function in R and introduced it to my coworkers. The function is designed to make plotting easier and more efficient, which will in turn be more cost-effective for the company. The reviews for the function have been positive thus far, except for one

Re: [R] smoothing parameter in locfit package

2010-05-10 Thread FMH
Thank you Andy. I'm aware of that but my question is about the way  the locfit package use to automatically determine the bandwidth/smoothing parameter if Gauss kernel density function is used as the weight function. Does the generalized cross validation criteria is imposed here or does the valu

[R] ggplot2 and geom_pointrange

2010-05-10 Thread michael westphal
Hello: I am using the ggplot2 package on R 2.10.1. I am plotting points using geom_pointrange. Is there a way to overlay hashmarks on the points, specifically the median and the min and max of the range? Cheers, Michael [[alternative HTML version deleted]]

Re: [R] Random walk

2010-05-10 Thread Albyn Jones
Sums of correlated increments have the same correlation as the original variables... library(mvtnorm) X<- matrix(0,nrow=1000,ncol=2) for(i in 1:1000){ Y <- rmvnorm(1000,mean=mu,sigma=S) X[i,] <- apply(Y,2,sum) } cor(Y) [,1] [,2] [1,] 1.000 0.4909281 [2,] 0.4909281 1.0

[R] [Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10]

2010-05-10 Thread Elisabeth Bjerke Rastad
Hello! Thank you for answering! What I am trying to do is to plot my raw values (biomass of different species) on a logaritmic y-axis with the base of e. When I type "log="y"", the axis transforms into a logaritmic axis with the base of 10. Best regards, Elisabeth > Dear Elisabeth, > > I'm

Re: [R] smoothing parameter in locfit package

2010-05-10 Thread Liaw, Andy
Loader's book is the ultimate reference (other than the source code...). I don't have it with me right now, so can't tell you for sure. However, it seems like an odd thing to do to use a different kernel at the selection step than the final estimation step. I should think if you specify the k

Re: [R] post-hoc t-tests, for lme / lmer models

2010-05-10 Thread Kay Cichini
no one? any pointers would really be greatly appreciated! thanks, kay - Kay Cichini Postgraduate student Institute of Botany Univ. of Innsbruck -- View this message in context: http://r.789695.n4.nabble.com/post-hoc-t-tests-for-lme-lmer-m

Re: [R] How to estimate whether overfitting?

2010-05-10 Thread Bert Gunter
(Near) non-identifiability (especially in nonlinear models, which include linear mixed effects models, Bayesian hierarchical models, etc.) is typically a strong clue; usually indicated by software complaints (e.g. convergence failures, running up against iteration limits, etc.). However this is s

Re: [R] Plotting log-axis with the exponential base to a plot with the default logarithm base 10

2010-05-10 Thread Xianwen Chen
Dear Elisabeth, I'm not sure if I have understood your question -- are you trying to use a different logarithmic base? Kind regards, Xianwen On Sun, May 9, 2010 at 8:05 PM, Elis

[R] Plotting residuals from a sem object

2010-05-10 Thread Jesse Young
R experts - I'm using John Fox's sem package to analyze a simple path model (two correlated predictor variables directly influencing a single criterion variable): Predictor1 -> Criterion Predictor2 -> Criterion Predictor1 <-> Predictor2 I'm giving a presentation on this material next week, and

Re: [R] Extracting a subset

2010-05-10 Thread Silvano
Hi, I used #-- # Análise do PESO - #-- pesom1 = cbind(PESO[MÊS==1]) pesom3 = cbind(PESO[MÊS==3]) #- Grupo Placebo - pesom1p = pesom1[GRUPO=='P'] pesom3p = pesom3[GRUPO=='P'] t.test(pesom1p, pesom3p, paired=T) #- Grupo Cogumelo - p

Re: [R] smoothing parameter in locfit package

2010-05-10 Thread Liaw, Andy
See the "kern" argument in ?locfit.raw. Andy From: FMH > Hi, > > In the locfit package, could someone please let me know the > automatic selection of smoothing parameter if Gauss kernel > density function is used as weight function? > > thanks > Fir > > > > [[alternative HTML

Re: [R] dot plot with error bands

2010-05-10 Thread David Winsemius
On May 10, 2010, at 10:00 AM, Alexey Bessudnov wrote: Dear all, I'm trying to create a dot plot with error bands with Dotplot(labels ~ Cbind(estimate, lower, upper), data=For.plot) where estimate, lower and upper are numerical vectors, and labels is a character vector that contains labels.

Re: [R] empty matrix

2010-05-10 Thread Ista Zahn
I think matrix(nrow=0, ncol=0) will do it. -Ista On Mon, May 10, 2010 at 7:15 AM, anderson nuel wrote: > Dear r-help, > > Could you help me to find the function which create an empty matrix. > > I use matrix(), but it gives *a single value that is NA and length of > this > matrix is 1.* > ** >

Re: [R] empty matrix

2010-05-10 Thread Duncan Murdoch
On 10/05/2010 7:15 AM, anderson nuel wrote: Dear r-help, Could you help me to find the function which create an empty matrix. I use matrix(), but it gives *a single value that is NA and length of this matrix is 1.* Not sure what you mean by an empty matrix, but here's one interpretation:

Re: [R] Extracting a subset

2010-05-10 Thread Ivan Calandra
Hi, My first suggestion would be to supply a sample data (maybe using the function dput) showing what you have, what you want to do, and what you've tried (you say that subset() didn't work but we don't know how you've typed it). Then, we'll see! Ivan Le 5/10/2010 14:35, Silvano a écrit :

Re: [R] empty matrix

2010-05-10 Thread Uwe Ligges
On 10.05.2010 13:15, anderson nuel wrote: Dear r-help, Could you help me to find the function which create an empty matrix. Help is: ?matrix Uwe Ligges I use matrix(), but it gives *a single value that is NA and length of this matrix is 1.* ** *Best Regards* [[alternative HT

Re: [R] Extracting a subset

2010-05-10 Thread Uwe Ligges
On 10.05.2010 14:35, Silvano wrote: Hi, I have a dataset with many variables and observations. The variable Group has two levels: C and P, the Month variable has four levels: 0, 1, 2 and 3. I want to extract a subset of the variable Weight, considering only 1 and 3 levels for Months of the Gr

[R] estimating mean income

2010-05-10 Thread Erwin Kalvelagen
Hi: This is more a statistical question than an R question (apologies!). I have some income data as follows: <$5000 : 598 $5000-$1 : 2586 $65001-$7 : 202 $70001+ : 446 I.e an open ended income class for incomes > $70k. What would be the best way to estimate mean income? Somethin

[R] dot plot with error bands

2010-05-10 Thread Alexey Bessudnov
Dear all, I'm trying to create a dot plot with error bands with Dotplot(labels ~ Cbind(estimate, lower, upper), data=For.plot) where estimate, lower and upper are numerical vectors, and labels is a character vector that contains labels. The problem is that labels are automatically sorted alp

[R] empty matrix

2010-05-10 Thread anderson nuel
Dear r-help, Could you help me to find the function which create an empty matrix. I use matrix(), but it gives *a single value that is NA and length of this matrix is 1.* ** *Best Regards* [[alternative HTML version deleted]] __ R-help@r-pro

Re: [R] update R 2.11.0,there is error when usi ng plot(), how can I do?

2010-05-10 Thread bbslover
now. it is ok. I uninstall R2.11.0, then delete an packages in the library, and install again R2.11.0. ok, it does works. thank you! -- View this message in context: http://r.789695.n4.nabble.com/update-R-2-11-0-there-is-error-when-using-plot-how-can-I-do-tp2164517p2165235.html Sent from th

[R] Extracting a subset

2010-05-10 Thread Silvano
Hi, I have a dataset with many variables and observations. The variable Group has two levels: C and P, the Month variable has four levels: 0, 1, 2 and 3. I want to extract a subset of the variable Weight, considering only 1 and 3 levels for Months of the Group variable. I tried the command s

[R] smoothing parameter in locfit package

2010-05-10 Thread FMH
Hi, In the locfit package, could someone please let me know the automatic selection of smoothing parameter if Gauss kernel density function is used as weight function? thanks Fir [[alternative HTML version deleted]] __ R-help@r-proj

[R] dot plot with error bands

2010-05-10 Thread Alexey Bessudnov
Dear all, I'm trying to create a dot plot with error bands with Dotplot(labels ~ Cbind(estimate, lower, upper), data=For.plot) where estimate, lower and upper are numerical vectors, and labels is a character vector that contains labels. The problem is that labels are automatically sorted alp

[R] Comparing Survival: Mantel-Byar Test

2010-05-10 Thread Raphael Fraser
The Mantel-Byar test is a simple modification to the logrank test. Can R perform this test or any other similar test? Raphael __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Installing randomForest on Ubuntu Errors

2010-05-10 Thread Dirk Eddelbuettel
Steve, The list r-sig-debian is a more appropriate forum for this question as it is dedicated to R on Debian / Ubuntu. On 10 May 2010 at 08:24, steve_fried...@nps.gov wrote: | | Hello, | | I've tried to install randomForest on a Ubuntu 8.04 Hardy Heron system. | | I've repeatedly rec'd the er

Re: [R] How to estimate whether overfitting?

2010-05-10 Thread Frank E Harrell Jr
On 05/10/2010 12:32 AM, bbslover wrote: many thanks . I can try to use test set with 100 samples. anther question is that how can I rationally split my data to training set and test set? (training set with 108 samples, and test set with 100 samples) as I know, the test set should the same di

Re: [R] lattice: customising panel.segments using groups

2010-05-10 Thread Felix Andrews
On 9 May 2010 15:25, Ky Mathews wrote: > Hi, > > > > I want to customise the segments on an xyplot. Below is a simple example > of what I'm trying to do... > > > > #Example dataset > >  x <- c(-0.25, 0.25, 0.8) > >  y <- c(-0.5, 0, 0.75) > >  gp <- c("A", "I", "C") > >  my.data <- cbind.data.frame

Re: [R] randomForest: sampling with replacement?

2010-05-10 Thread Max Kuhn
>> Would you please confirm that it is a bootstrap sample with >> replacement? Someone should note that the definition of a bootstrap sample is a sample with replacement (usually of size n). I've read quite a few papers where they claim to be using the bootstrap. Upon further review (sometimes to

Re: [R] Rd files must have a non-empty \title

2010-05-10 Thread Duncan Murdoch
On 10/05/2010 7:43 AM, Assa Yeroslaviz wrote: Hello everybody, I'm trying to install a package I have built. This package contains three scripts with various functions (S3 as well as S4 classes) I run at first the package.skeleton command with: > package.skeleton("affyAnalysis", namespace=TRUE

Re: [R] Installing randomForest on Ubuntu Errors

2010-05-10 Thread Liaw, Andy
I don't know much about how permissions are managed under ubuntu, but you can try a couple of things: - Dirk had worked very hard at automating building of CRAN packages for Debian (from which Ubuntu is based). I believe randomForest is among one of those available. I'm not sure if you need to s

[R] Installing randomForest on Ubuntu Errors

2010-05-10 Thread Steve_Friedman
Hello, I've tried to install randomForest on a Ubuntu 8.04 Hardy Heron system. I've repeatedly rec'd the error: > install.packages("randomForest", dependencies = TRUE) ERROR: compiliation failed for package 'randomForest' ** Removing '/home/admuser/R/i486-pc-linux-gnu-library/2.6/randomForest

Re: [R] Machine Learning and R

2010-05-10 Thread Liaw, Andy
I've not seen the book myself, but Graham Williams (author of the rattle package) has been working on a book that perhaps may fit your need. http://datamining.togaware.com/survivor/index.html Andy From: Wensui Liu > > good question! > if there is such a book, i'd also like to read as well. > >

Re: [R] randomForest: sampling with replacement?

2010-05-10 Thread Liaw, Andy
See the "replace" argument in ?randomForest. Andy > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Dimitri > Liakhovitski > Sent: Friday, May 07, 2010 12:21 PM > To: r-help > Subject: [R] randomForest: sampling with replacem

[R] Rd files must have a non-empty \title

2010-05-10 Thread Assa Yeroslaviz
Hello everybody, I'm trying to install a package I have built. This package contains three scripts with various functions (S3 as well as S4 classes) I run at first the package.skeleton command with: > package.skeleton("affyAnalysis", namespace=TRUE, code_files =c("defS3.R", "defS4.R", "qc.R"))

Re: [R] Problems executing cor(dataset) function in R 2.11.0 for OS X ( It works fine in R 2.10.1)

2010-05-10 Thread Duncan Murdoch
On 10/05/2010 7:36 AM, Ruben Garcia Berasategui wrote: Dear all, when trying to replicate John M. Quick's example for correlations between multiple variables posted on: http://rtutorialseries.blogspot.com/2009/11/r-tutorial-series-zero-order.html with R 2.11.0 (GUI 1.33) using my MacBook Pro

[R] Problems executing cor(dataset) function in R 2.11.0 for OS X ( It works fine in R 2.10.1)

2010-05-10 Thread Ruben Garcia Berasategui
Dear all, when trying to replicate John M. Quick's example for correlations between multiple variables posted on: http://rtutorialseries.blogspot.com/2009/11/r-tutorial-series-zero-order.html with R 2.11.0 (GUI 1.33) using my MacBook Pro with OX X 10.5.8 I got the following error message > d

Re: [R] scope of a function + lazy evaluation

2010-05-10 Thread Gabor Grothendieck
When you call a function R passes a "promise" to it for each argument. A promise consists of the unevaluated variable together with the environment in which it should evaluate the variable when time comes to evaluate it. Thus tmp[[1]] contains function(y) y and in the environment of function(y) y

Re: [R] scope of a function + lazy evaluation

2010-05-10 Thread Duncan Murdoch
sayan dasgupta wrote: Hey guys, I have a doubt here , It is something simple I guess, what am I missing out here ?? f <- function(y) function() y tmp <- vector("list", 5) for (i in 1:5) tmp[[i]] <- f(i) tmp[[1]]() # returns 5; z <- f(6) tmp[[1]]() # still returns 5; it should return 6 "ideall

  1   2   >