Re: [R] ODD and EVEN numbers

2010-04-01 Thread Detlef Steuer
Just to give you a hint for the future: If you ask google for "odd, even, R" you get a messages from 2003 as second match: --- Dave Caccace wrote: > Hi, > I'm trying to create a function, jim(p) which varies > depending on whether the value of p is odd or even. I > w

[R] Exporting Nuopt from splus to R

2010-04-01 Thread Jp2010
Hi all, Thanks for the wonderful forum with all the valuable help and comments here. I have been a splus user for the past 7 to 8 years and now crossing the mind of changing over to R. Have been doing a lot of reading and one of the main reasons is being an open source and the wonderful things th

[R] ODD and EVEN numbers

2010-04-01 Thread girlme80
Excuse me Carl Withoft! For your information, this is not my homework. I'm just helping my friend in "a part" of her R code. And everytime I ask a question here, it's just a "SMALL PART" of the 2-pages-program that I am doing. And for your information, the answers that I get, I still think on

[R] R Help

2010-04-01 Thread Ryan Cooper
Has anyone programmed the Nonparametric Canonical Correlation method in R? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commente

Re: [R] time series problem: time points don't match

2010-04-01 Thread Brad Patrick Schneid
Gabor: That is not the ideal solution, but it definitely works to provide me with the "easier alternative". Thanks for the reply! -- View this message in context: http://n4.nabble.com/time-series-problem-time-points-don-t-match-tp1748387p1748706.html Sent from the R help mailing list archive

Re: [R] reading excel into R

2010-04-01 Thread Ravi Kulkarni
Use R Commander to do this. R Commander is a R package that offers a GUI for R. It can be downloaded like any other R package. If you use R Commander, there is a menu option where you specify that you want to read an Excel file (you can also read text, SPSS, Minitab, Stata, Access... files). It i

[R] roccomp

2010-04-01 Thread joann
Does anyone know of a way to compare to ROC curves in R using the same method used by roccomp in Stata? -- View this message in context: http://n4.nabble.com/roccomp-tp1748818p1748818.html Sent from the R help mailing list archive at Nabble.com. __ R-

[R] BATCH jobs taking too much resources?

2010-04-01 Thread Stuart Luppescu
Is there something unusual about the way BATCH jobs are run? I ran a job like this: nice R CMD BATCH program.R It ran for a little while and then it starting eating up huge amounts of resources. Here is the entry from top: top 17:34:10 up 36 days, 8:10, 4 users, load average: 13.11, 6.85, 3.7

Re: [R] You are right and the problem is solved. Re: about the possible errors in Rgraphviz Package

2010-04-01 Thread Gabor Grothendieck
I finally got Rgraphviz to work. I uninstalled Rgraphviz and graphviz, did a reboot of Vista, installed graphviz again making sure to wget the path name found in the Rgraphviz README (in the Rgraphviz source .tar.gz) and did another reboot of Vista and also removed Rgraphviz, did another reboot of

Re: [R] Confusing concept of vector and matrix in R

2010-04-01 Thread Johannes Huesing
Rolf Turner [Tue, Mar 30, 2010 at 09:48:12PM CEST]: [...] > Who designed Excel? Among others, Joel Spolsky. Is that an appeal to authority? -- Johannes Hüsing There is something fascinating about science.

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread Peter Ehlers
Steve, Thanks for providing an example (which does, however need a bit of tweaking; BTW, it's usually not a good idea to cbind your data when what you really want is a data.frame). Your guess about some clever way of using abline() is unfortunately not correct - as the help page indicates, the s

[R] Heterogeneous bootstrap

2010-04-01 Thread Xiaoxi Gao
Hello all, Can anybody tell me how to implement the heterogeneous bootstrap algorithm by the FEAR package. I only know there is a command (boot.sw98) for homogeneous bootstrap. Thanks a lot. Xiaoxi

Re: [R] How to get the scale limits in lattice plot

2010-04-01 Thread James Rome
The key was to use grid.text() inside the panel function. It allows you to specify things in 0-1 "npc" units. On 4/1/10 12:23 PM, David Winsemius wrote: > > On Apr 1, 2010, at 11:53 AM, James Rome wrote: > >> I am drawing a density histogram, and want to label the plots with the >> mean using ltex

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread RICHARD M. HEIBERGER
## Steve, ## please use the ancova function in the HH package. install.packages("HH") library(HH) ## windows.options(record=TRUE) windows.options(record=TRUE) # hypothetical data beak.lgth <- c(2.3,4.2,2.7,3.4,4.2,4.8,1.9,2.2,1.7,2.5,15,16.5,14.7,9.6,8.5,9.1, 9.4,17.7,15.6,14,6.8,8.5,9.4,10.5

Re: [R] ODD and EVEN numbers

2010-04-01 Thread Carl Witthoft
There you go, solving his homework again... > > Hi, > > anyone here who knows how to determine if an integer is "odd" or > "even" in > R? > Thanks. > 2 %% 2 == 0 [1] TRUE > 3 %% 2 == 0 [1] FALSE is.even <- function(x){ x %% 2 == 0 } > is.even(2) [1] TRUE __

Re: [R] time series problem: time points don't match

2010-04-01 Thread Gabor Grothendieck
Perhaps something like this: library(zoo) library(chron) # read in data Lines1 <- "datetimelevel temp 2009/10/01 00:01:52.0 2.8797 18.401 2009/10/01 00:16:52.0 2.8769 18.382 2009/10/01 00:31:52.0 2.8708 18.309 2009/10/01 00:46:52.0

Re: [R] nlrq parameter bounds

2010-04-01 Thread AJBG
Thank you for your reply Matthew, There are many things I could say about the myriad difficulties I have had in progressing with R, none worth stating here. For the record I have read the posting guidelines, at least to the extent possible in the time available. For what its worth, I think I h

[R] A link to a collection of tutorials and videos on R.

2010-04-01 Thread datakid ..
A link to a collection of tutorials and videos on R. Tutorials: http://www.dataminingtools.net/browsetutorials.php?tag=rdmt Videos: http://www.dataminingtools.net/videos.php?id=8 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] Value-at-Risk Portfolio(both equity and option)

2010-04-01 Thread zhang
Thank you very much. Since I have never heard of "blotter" before, now I am really excited. It seems exactly what I have been searching. Would be really grateful if you could share some codes/examples regarding to this. I did not happen to find the help file for the package. Thanks again. -- V

[R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread Steven Worthington
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual sl

Re: [R] Using a string as a variable name - revisited

2010-04-01 Thread Erik Iverson
I meant to add that I'm guessing from this: "What it seems to be doing is converting the text "Aulacoseira_islandica" to a number (25, for some reason" is that foo is a factor, but we have no way of knowing without a reproducible example. Euan Reavie wrote: I would like to revisit a proble

Re: [R] Using a string as a variable name - revisited

2010-04-01 Thread Erik Iverson
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Euan Reavie wrote: I would like to revisit a problem that was discussed previously (see quoted discussion below). I am trying to do the same thing, us

[R] Using a string as a variable name - revisited

2010-04-01 Thread Euan Reavie
I would like to revisit a problem that was discussed previously (see quoted discussion below). I am trying to do the same thing, using a string to indicate a column with the same name. I am making "foo" a string taken from a list of names. It matches the row where "item" = 5, and picks the correspo

Re: [R] sample size > 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Ravi Varadhan
The discussion of Leo Breiman's paper in Statistical Science: Statistical Modeling - The Two cultures, is a must read for all statisticians doing prediction modeling. Especially see the exchange between Cox and Breiman (I call this the Cox-Breiman duel). Ravi.

[R] Course***R Advanced Programming April 2010***R Courses*** by XLSolutions Corp Seattle, San Francisco, Salt Lake City

2010-04-01 Thread s...@xlsolutions-corp.com
XLSolutions is proud to announce our April 2010 R/S-PLUS Advanced Programming course in USA *** R/S Systems: Advanced Programming *** S/R-PLUS Programming 3: Advanced Techniques and Efficiencies. More on website http://www.xlsolutions-corp.com/rplus.asp Ask for group discount and reserve your

Re: [R] Aligning text in the call to the text function

2010-04-01 Thread baptiste auguie
Hi, One option with Grid graphics, m <- matrix(c( 1667,3,459, 2001, 45, 34, 1996, 2,5235), dimnames=list(c("Eric & Alan", "Alan","John & David")), ncol=3, byrow=T) ## install.packages("gridExtra", repos="http://R-Forge.R-project.org";) library(gri

Re: [R] Line Graph Labels

2010-04-01 Thread zachcp
thanks again walmes. but the new problem would be that not all of the peaks are the same intensity. therefore the top five datapoints from my highest peak have greater intensity values than the highest point in the second-highest peak. but this is once again helpful. i found that there is a libra

Re: [R] pvals.fnc() with language R does not work with R 2.10.1

2010-04-01 Thread Ben Bolker
ozge gurcanli cogsci.jhu.edu> writes: > > > Hi Everyone, > > I am using R 2.10.1. lmer function works properly, however pvals.fnc > () does not despite the fact that I uploaded: > > - library(lme4) > - library(coda) > - library(languageR) > > This is the error message I get > > pvals.f

Re: [R] Line Graph Labels

2010-04-01 Thread Walmes Zeviani
You can set the number of extreme points to be labeled instead of define a cutoff. Look: da <- data.frame(y=rnorm(50), x=1:50) plot(y~x, data=da) abline(h=c(-2,2), lty=3) with(da, text(x[abs(y)>2], y[abs(y)>2], label=x[abs(y)>2], pos=2)) da <- da[order(da$y),] plot(y~x, data=da) # five small and

[R] Analyzing binary data on an absolute scale and determining conditions when risks become equal between groups

2010-04-01 Thread Chaudhari, Bimal
Suppose I have a binary outcome (disease/no disease and all subjects had the same period of exposure) and 2 or 3 (categorical) predictors. I can obviously build a logistic regression model which describes the data, possibly including interaction terms, on a relative scale: model<-glm(disease~se

Re: [R] Aligning text in the call to the text function

2010-04-01 Thread Duncan Murdoch
On 01/04/2010 3:39 PM, Tighiouart, Hocine wrote: Hi, I have text (see below) that is aligned nicely when printed in the command window in R but when plotted using text function, it does not show alignment unless I use the family="mono" in the call to the text function. Is there a way to specify

[R] Aligning text in the call to the text function

2010-04-01 Thread Tighiouart, Hocine
Hi, I have text (see below) that is aligned nicely when printed in the command window in R but when plotted using text function, it does not show alignment unless I use the family="mono" in the call to the text function. Is there a way to specify a different font while maintaining the alignment?

Re: [R] sample size > 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Frank E Harrell Jr
Good comments Bert. Just 2 points to add: People rely a lot on the tree structure found by recursive partitioning, so the structure needs to be stable. This requires a huge samples size. Second, recursive partitioning is not competitive with other methods in terms of predictive descriminatio

[R] pvals.fnc() with language R does not work with R 2.10.1

2010-04-01 Thread ozge gurcanli
Hi Everyone, I am using R 2.10.1. lmer function works properly, however pvals.fnc () does not despite the fact that I uploaded: - library(lme4) - library(coda) - library(languageR) This is the error message I get pvals.fnc(lexdec3.lmerE2, nsim=1)$fixed Error in pvals.fnc(lexdec3.lme

Re: [R] Line Graph Labels

2010-04-01 Thread zachcp
Thanks Walmes, that does indeed work well for labeling all points greater than some specified value. But the problem is that while my peaks are very sharp there is more than one point along the line as it slopes up. This method will label those points as well , making the data look cluttered. Ide

Re: [R] Regression

2010-04-01 Thread Erik Iverson
Bruce, You don't tell us what class of data your y is. Assuming y is defined in your enviroment, what does class(y) and str(y) tell you? You'll most likely have to fine-tune your data reading process, or do some post-processing to make sure the y object (and x for that matter) are the

Re: [R] Regression

2010-04-01 Thread Duncan Murdoch
On 01/04/2010 2:59 PM, Bruce Kindseth wrote: I am trying to learn R, and am having problems with doing a simple linear regression. I loaded data from a fixed width file, using wd=c(...), and read.fwf(...) and I can read in the file ok and it comes in as vectors in columns, which is what I expect

Re: [R] t.test data in one column

2010-04-01 Thread Phil Spector
Marlin - Consider the following: df = data.frame(x=rep(1:4,2),y=rep(c('M','F'),c(2,2))) t.test(x~y,data=df) Welch Two Sample t-test data: x by y t = 4.899, df = 6, p-value = 0.002714 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interva

Re: [R] t.test data in one column

2010-04-01 Thread Erik Iverson
Hello, Marlin Keith Cox wrote: I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary p

[R] update.packages() and install.packages() does not work more because of "Error in read.dcf"

2010-04-01 Thread R P Herrold
On Thu, 1 Apr 2010, Uwe Ligges wrote: herrold, before: The true fault causing the noted message seems to be that there is a faulty compression/decompression occuring in a carried library -- would't it be better to not bundle a frozen library, and to rather simply 'flag' packages needed a rebuild

[R] Regression

2010-04-01 Thread Bruce Kindseth
I am trying to learn R, and am having problems with doing a simple linear regression. I loaded data from a fixed width file, using wd=c(...), and read.fwf(...) and I can read in the file ok and it comes in as vectors in columns, which is what I expected. The problem is when I try to do a linear r

Re: [R] Using GIS data in R

2010-04-01 Thread Don MacQueen
I'm currently doing a lot of simple GIS work in R, including points in polygon queries. My .Rprofile file has require(maptools) require(rgdal) With that as a starting point, I find that the data structures play well together. Define a coordinate reference system object with crs.ll <-

[R] t.test data in one column

2010-04-01 Thread Marlin Keith Cox
I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary p-value indicates this. How can I

Re: [R] for loop; lm() regressions; list of vectors

2010-04-01 Thread Uwe Ligges
On 30.03.2010 20:57, David Winsemius wrote: On Mar 30, 2010, at 12:42 PM, Driss Agramelal wrote: ## Hello everyone, ## ## I am trying to execute 150 times a lm regression using the 'for' loop, with 150 vectors for y, ## ## and always the same vector for x. ## ## I have an object with 150 ele

Re: [R] update.packages() and install.packages() does not work more because of "Error in read.dcf"

2010-04-01 Thread Uwe Ligges
On 30.03.2010 23:00, R P Herrold wrote: On Tue, 30 Mar 2010, Prof Brian Ripley wrote: A hint: I have seen this exact error message with a build configured to use the system's zlib 1.2.4 (which has been out for about 2 weeks), and this incompatibility is noted in the current R 2.11.0 alpha's m

Re: [R] "is" and the story of a typo

2010-04-01 Thread Uwe Ligges
On 31.03.2010 10:21, (Ted Harding) wrote: On 30-Mar-10 23:23:09, Jim Lemon wrote: Hi all, The gurus may pour scorn on me for not knowing this, but I happened to mistype "if" as "is" in the heat of debugging a function. As I scanned the debugged function with some satisfaction, I noticed the e

Re: [R] Best fitted curve using AIC

2010-04-01 Thread Graham Smith
Simon > I need a R script that compare known curves (e.g. logistic, exponential) > with my curve. That curve was generated fitting data of forest cover > (hectares) measured in 10 road distances (buffers). > > I´d like that comparison should be done using AICc to select the best model, > that is,

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread Jeff Brown
Wow, those are much more elegant. Thanks! Peter suggests: df[] <- lapply(df, factor, levels=allLevels, labels=seq_along(allLevels)) Henrique suggests: df[] <- as.numeric(unlist(df)) In both of those cases, why is the [] needed? When I evaluate df vs. df[], they both look the same, but app

[R] barplot with error bar in lattice

2010-04-01 Thread milton ruser
Dear all, I have a data.frame like below and I need to plot horizonal with error bar only for upper limit. On the code below I am able to plot the bars within groups, but I need (1) change from vertical to horizonal plot and (2) add the error bar. any hint are welcome. milton mydf<-read.ta

Re: [R] Line Graph Labels

2010-04-01 Thread Walmes Zeviani
You can adapt the following example da <- data.frame(y=rnorm(50), x=1:50) plot(y~x, data=da) abline(h=c(-2,2), lty=3) with(da, text(x[abs(y)>2], y[abs(y)>2], label=x[abs(y)>2], pos=2)) Walmes. - ..ooo0 .

[R] Best fitted curve using AIC

2010-04-01 Thread Simone Freitas
Dear fellows, I need a R script that compare known curves (e.g. logistic, exponential) with my curve. That curve was generated fitting data of forest cover (hectares) measured in 10 road distances (buffers). I´d like that comparison should be done using AICc to select the best model, that is, th

[R] time series problem: time points don't match

2010-04-01 Thread Brad Patrick Schneid
Hi, I have a time series problem that I would like some help with if you have the time. I have many data from many sites that look like this: Site.1 datetimelevel temp 2009/10/01 00:01:52.0 2.8797 18.401 2009/10/01 00:16:52.0 2.8769 18.382

Re: [R] trying to understand lme() results

2010-04-01 Thread array chip
Thanks Dennis for the thorough explanation and correction on the design. John --- On Thu, 4/1/10, Dennis Murphy wrote: From: Dennis Murphy Subject: Re: [R] trying to understand lme() results To: "array chip" Cc: R-help@r-project.org Date: Thursday, April 1, 2010, 12:33 AM Hi: On Wed, Mar 3

Re: [R] Scope and assignment: baffling

2010-04-01 Thread Gabor Grothendieck
The code you presented is very close to object oriented in the style of the proto package. For example, library(proto) # generate a single object p p <- proto(a = 0, geta = function(.) .$a, incra = function(.) .$a <- .$a + 5) p$geta() p$a # same p$incra() p$geta() # Or if you

Re: [R] sample size > 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread hadley wickham
> Incidentally, there is nothing new or radical in this; indeed, John Tukey, > Leo Breiman, George Box, and others wrote eloquently about this decades ago. > And Breiman's random forest modeling procedure explicitly abandoned efforts > to build simply interpretable models (from which one might infe

Re: [R] Scope and assignment: baffling

2010-04-01 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff Brown > Sent: Wednesday, March 31, 2010 6:45 PM > To: r-help@r-project.org > Subject: [R] Scope and assignment: baffling > > > Hi, > > The code below creates a value, x$a,

Re: [R] sample size > 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Bert Gunter
Since Frank has made this somewhat cryptic remark (sample size > 20K) several times now, perhaps I can add a few words of (what I hope is) further clarification. Despite any claims to the contrary, **all** statistical (i.e. empirical) modeling procedures are just data interpolators: that is, all t

Re: [R] nlrq parameter bounds

2010-04-01 Thread Matthew Dowle
Ashley, This appears to be your first post to this list. Welcome to R. Over 2 days is quite a long time to wait though, so you are unlikely to get a reply now. Feedback: since nlrq is in package quantreg, its a question about a package and should be sent to the package maintainer. Some packages

Re: [R] predicted time length differs from survfit.coxph:

2010-04-01 Thread Thomas Lumley
On Wed, 31 Mar 2010, Parminder Mankoo wrote: Hello All, Does anyone know why length(fit1$time) < length(fit2$n) in survfit.coxph output? Why is the predicted time length is not the same as the number of samples (n)? In fact it is not true that length(fit1$time) < length(fit2$n), since length

Re: [R] Using a Data Frame/Matrix outside a function

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 12:16 PM, Greg Gilbert wrote: I have code that creates the same matrices , "a" and "b". The code creating "a" is not in a function and the code creating "b" is in a function. I would like to do operations on "b" like I can on "a", however I can't figure out how I can r

Re: [R] Adding RcppFrame to RcppResultSet causes segmentation fault

2010-04-01 Thread Matthew Dowle
He could have posted into this thread then at the time to say that. Otherwise it appears like its open. "Romain Francois" wrote in message news:4bb4c4b8.2030...@dbmail.com... The thread has been handled in Rcpp-devel. Rob posted there 7 minutes after posting on r-help. FWIW, I think the proble

Re: [R] How to get the scale limits in lattice plot

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 11:53 AM, James Rome wrote: I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for th

Re: [R] How to get the scale limits in lattice plot

2010-04-01 Thread Peter Ehlers
On 2010-04-01 9:53, James Rome wrote: I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for the plot, so

Re: [R] how to construct a time series

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 9:56 AM, n.via...@libero.it wrote: Hi, I need to generate the time series of the production, but as I'm new to this topic I am not able to do that. This is what the time series should be: PROD(t)=PROD(t,T) PROD(t-1)=PROD(t-1,T) PROD(t-2)=PROD(t-1)*PROD(t-2,T-1)/PROD(t-1

[R] Using a Data Frame/Matrix outside a function

2010-04-01 Thread Greg Gilbert
I have code that creates the same matrices , "a" and "b". The code creating "a" is not in a function and the code creating "b" is in a function. I would like to do operations on "b" like I can on "a", however I can't figure out how I can return a matrix (or data frame) from a function. Thanks for

Re: [R] Regarding the De-bugger in R

2010-04-01 Thread Tal Galili
One way I can think of is putting your loop inside a function (let's say "func3") and then use: library(debug) mtrace(func3) func3() # and this at the end: mtrace.off() And see the steps... Tal Contact Details:--- Contact me:

Re: [R] Adding RcppFrame to RcppResultSet causes segmentation fault

2010-04-01 Thread Romain Francois
The thread has been handled in Rcpp-devel. Rob posted there 7 minutes after posting on r-help. FWIW, I think the problem is fixed on the Rcpp 0.7.11 version (on cran incoming) Romain Le 01/04/10 17:47, Matthew Dowle a écrit : Rob, Please look again at Romain's reply to you on 19th March.

Re: [R] GUI /IDE

2010-04-01 Thread ManInMoon
Thanks Philippe, I will look at sciviews - I have never used it before. I use Rcmdr, and I find I am often selecting and running the same lines of code. I just thought if we could name them then easily "call" that region it would be useful. Cheers -- View this message in context: http://n4.na

Re: [R] Regarding the De-bugger in R

2010-04-01 Thread Ayush Raman
Snippet of my code: library(foreign) function1 <- function(y,t){ ###do some matrix operations ## } function2 <- function(y){ y1 = permute(y) F1 = function1(y1) } setwd("C:\\Results\\") ## Read Multiple Files files.total = list.files() for (j in files.total){ table1 = read.table(j) ###

[R] Using GIS data in R

2010-04-01 Thread Scott Duke-Sylvester
I have a simple problem: I need to load a ERSI shapefile of US states and check whether or not a set of points are within the boundary of these states. I have the shapefile, I have the coordinates but I'm having a great deal of difficulty bringing the two together. The problem is the various GIS pa

[R] bagging survival tree

2010-04-01 Thread paaventhan jeyaganth
Dear R users, I have problem with bagging survial tree after finding the final tree. f<-rpart(Surv(time ,dead )~ x1 +x2+ x3+x4+x5+x6, data=crp) f.prun<-prune(f,cp=0.036701) # final tree i have 3 endnote including #the variable x3 and x4 how can i use the bagging code i use like this but it d

[R] How to get the scale limits in lattice plot

2010-04-01 Thread James Rome
I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for the plot, so I can put the text at the correct positi

Re: [R] Adding RcppFrame to RcppResultSet causes segmentation fault

2010-04-01 Thread Matthew Dowle
Rob, Please look again at Romain's reply to you on 19th March. He informed you then that Rcpp has its own dedicated mailing list and he gave you the link. Matthew "R_help Help" wrote in message news:ad1ead5f1003291753p68d6ed52q572940f13e1c0...@mail.gmail.com... > Hi, > > I'm a bit puzzled. I u

Re: [R] Regarding the De-bugger in R

2010-04-01 Thread Tal Galili
Hi Ayush, Could you supply with a simple code to try to give an answer on ? Thanks, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebre

Re: [R] barplot and line

2010-04-01 Thread Tal Galili
Hi Roslina, here is a simple example: barplot.x.location <- barplot(c(12:17)) points(x = barplot.x.location, y = rep(10, length(aa)), col = 2, pch = 7) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 R

[R] Line Graph Labels

2010-04-01 Thread zachcp
I have a line graph that is flat and has sharp peaks (mass spectrometry data). I would like to plot my data and label the peaks with their x-axis value. I know it is possible to have a function to find local maxima and then to use these values in a label command but I am hoping there is a simpler

Re: [R] barplot and line

2010-04-01 Thread Greg Snow
Look at the 1st example on the help page for the updateusr function in the TeachingDemos package for a way to align a barplot and information added to it. See the axis function for creating your own custom axis. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare g

Re: [R] Factorial regression with multiple features: how to remove non-significant features?

2010-04-01 Thread Ista Zahn
Hi Parthiban, I urge you to rethink your approach, or at least proceed with extreme caution. Lower-order terms involved in higher-order interactions may not be what you think they are. And there are serious problems with stepwise model selection. I encourage you to read a good regression modeling

[R] Regarding the De-bugger in R

2010-04-01 Thread Ayush Raman
Hi, I would like to know if there is some debugger in R where I can check that I am not using or not doing calculation on my previously stored objects. I can't use rm (list = ls()) to remove all the objects since I am using a for loop for reading 500 files and making making common calculation for

[R] Basic Question (Real Basic)

2010-04-01 Thread Idgarad
I am having a total brain fart... complete and total. This is part R, Part Statstitics, Part "My Brain is on vacation apparently." Ok I have a time series I need to LOG and DIFF for ARIMA with Regressors. Say 100 data points. Obviously when I diff the series once I get 98 data points now. So what

[R] Factorial regression with multiple features: how to remove non-significant features?

2010-04-01 Thread Vijaya Parthiban
Hello all, I am trying to do factorial regression using lm() like this (example): model<-lm(y ~ x1 + x2 + x3 + x4 + x1*x2*x3*x4) The final term 'x1*x2*x3*x4' adds all possible interactions between explanatory variables to the model. i.e. x1:x2, x1:x2:x3, etc, etc. Now, the issue is that some of

[R] export R data as web service

2010-04-01 Thread Johann Hibschman
I'd like to access data in my R session from elsewhere via HTTP. My particular use case would be R on Linux, accessing data from Windows, all on the same intranet. Naively, when I say this, I imagine something like: > theData <- big.calculation.returning.data.frame() > startHttpServer(port=8675)

[R] how to construct a time series

2010-04-01 Thread n.via...@libero.it
Hi, I need to generate the time series of the production, but as I'm new to this topic I am not able to do that. This is what the time series should be: PROD(t)=PROD(t,T) PROD(t-1)=PROD(t-1,T) PROD(t-2)=PROD(t-1)*PROD(t-2,T-1)/PROD(t-1,T-1) PROD(t-3)=PROD(t-2)*PROD(t-3,T-2)/PROD(t-2,T-2) ... ...

[R] R: Generative Topographic Map

2010-04-01 Thread mauede
Thank you. I figured that out myself last night. I always forget that read.table does not actually read data into a matrix. GTM MatLab toolbox comes with a nice guide to use the package which may as well become an R vignette. Anyway, I got the singular matrix warnings myself and do not know whe

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread Henrique Dallazuanna
Try this also: df[] <- as.numeric(unlist(df)) df On Thu, Apr 1, 2010 at 2:53 AM, Jeff Brown wrote: > > Sorry for spamming.  I swear I had worked on that problem a long time before > posting. > > But I just figured it out: I have to change the values, which are > represented as integers, not stri

Re: [R] RCOM Save

2010-04-01 Thread Erich Neuwirth
Please be more precise. You seem not to use the rcom (note the lowercase name) package, but the RDCOMClient package which is not available from CRAN but as part of the Omegahat project. rcom has a command comCreateObject and RDCOMClient has a command COMCreate. The code you supplied will definite

Re: [R] About logistic regression

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 8:19 AM, Silvano wrote: Hi, I have a dichotomous variable (Q1) whose answers are Yes or No. Also I have 2 categorical explanatory variables (V1 and V2) with two levels each. I used logistic regression to determine whether there is an effect of V1, V2 or an interaction

Re: [R] About logistic regression

2010-04-01 Thread Eik Vettorazzi
Hi Silvano, this is FAQ 7.17 http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-does-the-output-from-anova_0028_0029-depend-on-the-order-of-factors-in-the-model_003f hth. Silvano schrieb: Hi, I have a dichotomous variable (Q1) whose answers are Yes or No. Also I have 2 categorical explanatory

[R] About logistic regression

2010-04-01 Thread Silvano
Hi, I have a dichotomous variable (Q1) whose answers are Yes or No. Also I have 2 categorical explanatory variables (V1 and V2) with two levels each. I used logistic regression to determine whether there is an effect of V1, V2 or an interaction between them. I used the R and SAS, just for

Re: [R] RCOM Save

2010-04-01 Thread Henrique Dallazuanna
Try this; On Thu, Apr 1, 2010 at 7:00 AM, koj wrote: > > Thank you. Unfortunately this recommendation does not solve my problem and I > don't know why. Here is my test-code: > > > pfad<-paste("C:/...","xls",sep=".") > xl <- COMCreate("Excel.Application") > xl[["Visible"]] <- FALSE xl[['Displa

Re: [R] fitness of regression tree: how to measure???

2010-04-01 Thread Frank E Harrell Jr
vibha patel wrote: Hello, I'm using rpart function for creating regression trees. now how to measure the fitness of regression tree??? thanks n Regards, Vibha If the sample size is less than 20,000, assume that the tree is a somewhat arbitrary representation of the relationships in the data

Re: [R] regular expression help to extract specific strings from text

2010-04-01 Thread Tony B
Thank you guys, both solutions work great! Seems I have two new packages to investigate :) Regards, Tony Breyal On 31 Mar, 14:20, Tony B wrote: > Dear all, > > Lets say I have the following: > > > x <- c("Eve: Going to try something new today...", "Adam: Hey @Eve, how are > > you finding R? #rs

Re: [R] RCOM Save

2010-04-01 Thread koj
Thank you. Unfortunately this recommendation does not solve my problem and I don't know why. Here is my test-code: pfad<-paste("C:/...","xls",sep=".") xl <- COMCreate("Excel.Application") xl[["Visible"]] <- FALSE wkbk <- xl$Workbooks()$Open(pfad) sh <- xl$ActiveShee

[R] fitness of regression tree: how to measure???

2010-04-01 Thread vibha patel
Hello, I'm using rpart function for creating regression trees. now how to measure the fitness of regression tree??? thanks n Regards, Vibha [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] reading excel into R

2010-04-01 Thread Gabor Grothendieck
See this link for a number of alternatives: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows On Thu, Apr 1, 2010 at 6:19 AM, cheba meier wrote: > Dear all, > > I am new R user and I am sure that this question has been asked quite often > and I have also googled it and read about it!

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread hadley wickham
On Thu, Apr 1, 2010 at 3:05 AM, Peter Dalgaard wrote: > Jeff Brown wrote: >> Sorry for spamming.  I swear I had worked on that problem a long time before >> posting. >> >> But I just figured it out: I have to change the values, which are >> represented as integers, not strings.  So the following c

[R] Palette color order in bwplot (lattice violin plot) vs. boxplot

2010-04-01 Thread Luigi Ponti
Hello, I am trying to give different colors to boxes in a violin plot obtained via bwplot from lattice package using a color palette from RColorBrewer: > require(RColorBrewer) > MyPalette <- brewer.pal(6, "Set3") A call to: > boxplot(count ~ spray, data = InsectSprays, col = MyPalette) yiel

Re: [R] reading excel into R

2010-04-01 Thread milton ruser
Dear Cheba Please, install the package "xlsReadWrite" I suppose that read.csv is to read csv files, not xls ones. cheers milton On Thu, Apr 1, 2010 at 6:19 AM, cheba meier wrote: > Dear all, > > I am new R user and I am sure that this question has been asked quite often > and I have also googl

Re: [R] Stack with factors

2010-04-01 Thread Peter Ehlers
On 2010-04-01 3:53, Ken Knoblauch wrote: Kenneth Roy Cabrera Torres une.net.co> writes: Hi R users: I found that I cannot stack() a data.frame with factors. db1<-data.frame(replicate(6,factor(sample(c("A","B"),6,replace=TRUE str(db1) db2<-stack(db1) db2 "db2" does not have any row. How can

[R] reading excel into R

2010-04-01 Thread cheba meier
Dear all, I am new R user and I am sure that this question has been asked quite often and I have also googled it and read about it! I understood that in order to read excel sheet into R you need to open it and saved it as csv or text, is this true? or you can use read.delim2 and read.csv2 to do th

  1   2   >