Re: [R] Decision Tree: Am I Missing Anything?

2012-09-21 Thread Achim Zeileis
Hi, just to add a few points to the discussion: - rpart() is able to deal with responses with more than two classes. Setting method=class explicitly is not necessary if the response is a factor (as in this case). - If your tree on this data is so huge that it can't even be plotted, I

Re: [R] lattice dotplot reorder contiguous levels

2012-09-21 Thread Deepayan Sarkar
On Thu, Sep 20, 2012 at 7:48 PM, maxbre mbres...@arpa.veneto.it wrote: my reproducible example test-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,

Re: [R] lattice dotplot reorder contiguous levels

2012-09-21 Thread Massimo Bressan
thank you all for your helpful replies to bert the problem with relation =same is the plotting along y axis of all categories (samp.time) for all groups (sites); instead, I need to plot along y axis just the categories for each group effectively having a corresponding observation to danny

Re: [R] (no subject)

2012-09-21 Thread Heramb Gadgil
Hi, Another way of doing may be like this; a - c(d, d, j, f, e, g, f, f, i, g) b - c(a, g, d, f, g, a, f, a, b, g) ta - table(a) tb - table(b) Function-function(Tab1,Tab2){elements=sort(unique(c(names(ta),names(tb

Re: [R] SQL query with Multicore option on R -linux

2012-09-21 Thread Heramb Gadgil
This is what I think; Hive internally distributes the data. If you have set up Hive on single core it will fetch the query results from that core. If you have multi-core system on which you have setup the Hive, it will search all the cores for the query submitted and results would be compiled

Re: [R] VarBrul in R

2012-09-21 Thread Heramb Gadgil
I do not know about the packages that you mentioned. I am trying to answer your query based on the term socio-linguistic analytics. There are packages like OpenNLP,OpenNLP.en,tm (Text Mining) that might be of your interest. Best, Heramb On Fri, Sep 21, 2012 at 1:04 AM, Trevor Jenkins

Re: [R] VarBrul in R

2012-09-21 Thread Krzysztof Mitko
On 2012-09-20 21:34, Trevor Jenkins wrote: Several years ago there were R implementations of a socio-linguistics analysis method called Variable Rule Analysis namely rbrul and r-varb. Both neither of the sites listed (in the method's WikiPedia page

Re: [R] lattice dotplot reorder contiguous levels

2012-09-21 Thread Massimo Bressan
deepayan, is that what you mean? but still the problem persists: nor correct neither contiguous labelling! I must probably reconsider everything from scratch: I'm bit confused now... test$samp.time.new - with(test, reorder(samp.time:site, as.numeric(site)))

Re: [R] VarBrul in R

2012-09-21 Thread Trevor Jenkins
On Fri, Sep 21, 2012 at 8:47 AM, Heramb Gadgil heramb.gad...@gmail.comwrote: I do not know about the packages that you mentioned. I am trying to answer your query based on the term socio-linguistic analytics. There are packages like OpenNLP,OpenNLP.en,tm (Text Mining) that might be of your

Re: [R] VarBrul in R

2012-09-21 Thread Trevor Jenkins
On Fri, Sep 21, 2012 at 8:58 AM, Krzysztof Mitko kmi...@mm.st wrote: On 2012-09-20 21:34, Trevor Jenkins wrote: Several years ago there were R implementations of a socio-linguistics analysis method called Variable Rule Analysis namely rbrul and r-varb. Both neither of the sites listed (in

Re: [R] puzzling script bug

2012-09-21 Thread Robert Douglas Kinley
Weeell , you were absolutely right. Turns out I was trying to be too clever by allowing for a different sized array in each call to a .C dll within the same R script. Changed it to the max size the script can request and all is gas and gaiters. Thanks for the pointer. Cheers

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-21 Thread mxkuhn
There is also C5.0 in the C50 package. It tends to have smaller trees that C4.5 and much smaller trees than J48 when there are factor predictors. Also, it has an optional feature selection (winnow) step that can be used. Max On Sep 21, 2012, at 2:18 AM, Achim Zeileis achim.zeil...@uibk.ac.at

[R] prune in rpart: choose number terminal nodes

2012-09-21 Thread agent dunham
Dear community, I've an rpart object, and I know the CP I want. I'd like to know if it's possible also to fix the number of terminal nodes I want. Thanks in advance, u...@host.com as u...@host.com -- View this message in context:

Re: [R] Wilcoxon Test and Mean Ratios

2012-09-21 Thread Henric (Nilsson) Winell
On 2012-09-20 21:07, Thomas Lumley wrote: On Fri, Sep 21, 2012 at 6:43 AM, avinash barnwal avinashbarnwal...@gmail.com wrote: Hi, http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test We can clearly see that null hypothesis is median different or not. One way of proving non difference is

[R] Inclusion of a countdown tool of remaining calculation time possible?

2012-09-21 Thread jennifer . moeller-gulland
Dear All, We are currently working with very large datasets which even in R require a lot of calculation time. Is there an option of including a function/ tool or something alike which shows the remaining time of calculation? Just to see whether there is any progress or whether anything has

[R] Malmquist-Luenberger Productivity Index programmed in R?

2012-09-21 Thread Jan Weiss
Dear All, I am a PhD Candidate in Economics wondering whether you might know this: is it possible to compute the Malmquist-Luenberger productivity index using R? Has this index been programmed by someone in R as yet? I found that the standard Malmquist productivity index has been programmed in

Re: [R] Inclusion of a countdown tool of remaining calculation time possible?

2012-09-21 Thread Ben Bolker
jennifer.moeller-gulland at de.pwc.com writes: Dear All, We are currently working with very large datasets which even in R require a lot of calculation time. Is there an option of including a function/ tool or something alike which shows the remaining time of calculation? Just to

Re: [R] Inclusion of a countdown tool of remaining calculation time possible?

2012-09-21 Thread Barry Rowlingson
2012/9/21 jennifer.moeller-gull...@de.pwc.com jennifer.moeller-gull...@de.pwc.com: Dear All, We are currently working with very large datasets which even in R require a lot of calculation time. Is there an option of including a function/ tool or something alike which shows the remaining time

[R] --enable-R-shlib and external BLAS/LAPACK libraries

2012-09-21 Thread Bjørn-Helge Mevik
A couple of years ago I noted that using the configure switch --enable-R-shlib when buildig R made configure ignore any specified external LAPACK library (I cannot recall if also the BLAS specification was ignored) and use the internal one insted. I asked why, and was told it was intentional.

Re: [R] Repeated Aggregation with data.table

2012-09-21 Thread Elliot Joel Bernstein
I still haven't come up with a solution to the question below, and I have another one. I frequently find myself in a situation where I have the list of columns I want to aggregate over in the form of a vector of strings, and I have to do something like the following: dat[, list(mean.z = mean(z)),

[R] Exactly Replicating Stata's Survey Data Confidence Intervals in R

2012-09-21 Thread Anthony Damico
Hi everyone, apologies if the answer to this is in an obvious place. I've been searching for about a day and haven't found anything.. I'm trying to replicate Stata's confidence intervals in R with the survey package, and the numbers are very very close but not exact. My ultimate goal is to

[R] Math expression in R plot

2012-09-21 Thread li li
Dear all, In my R plot, I would like to add the title as Estimator vs. Eta, where I want to use the greek letter eta. I was trying to use expression(plain(Estimator vs.) *eta* ). It does not seem to work. Can anyone familiar with this give some help? Thank you very much. Hannah

Re: [R] Math expression in R plot

2012-09-21 Thread peter dalgaard
On Sep 21, 2012, at 17:04 , li li wrote: Dear all, In my R plot, I would like to add the title as Estimator vs. Eta, where I want to use the greek letter eta. I was trying to use expression(plain(Estimator vs.) *eta* ). It does not seem to work. Can anyone familiar with this give some

Re: [R] scraping with session cookies

2012-09-21 Thread CPV
Thanks for your suggestion, The issue was resolved by Duncan's recommendation. Now I am trying to obtain data from different pages from the same site through a loop, however, the getURLContent keeps timing out, the odd part is that I can access to the link through a browser with no issues at

Re: [R] Parallel Programming

2012-09-21 Thread R. Michael Weylandt
On Fri, Sep 21, 2012 at 5:43 AM, Tjun Kiat Teo teotj...@gmail.com wrote: I am trying to do parallel programming and I tried this library(doSNOW) library(foreach) testfunc-function(x){ x-x+1 x } noc-2 cl - makeCluster(do.call(rbind,rep(list(localhost),noc)), type = SOCK)

Re: [R] Math expression in R plot

2012-09-21 Thread Bert Gunter
... and she might also want an additional space between vs. and eta, either by inserting it within the quotes explicitly or using: expression(plain(Estimator vs.)~eta) -- Bert On Fri, Sep 21, 2012 at 8:15 AM, peter dalgaard pda...@gmail.com wrote: On Sep 21, 2012, at 17:04 , li li wrote:

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-21 Thread Vik Rubenfeld
Max, I installed C50. I have a question about the syntax. Per the C50 manual: ## Default S3 method: C5.0(x, y, trials = 1, rules= FALSE, weights = NULL, control = C5.0Control(), costs = NULL, ...) ## S3 method for class ’formula’ C5.0(formula, data, weights, subset, na.action = na.pass, ...) I

Re: [R] Parallel Programming

2012-09-21 Thread Bert Gunter
Inline below. On Fri, Sep 21, 2012 at 9:05 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: On Fri, Sep 21, 2012 at 5:43 AM, Tjun Kiat Teo teotj...@gmail.com wrote: I am trying to do parallel programming and I tried this library(doSNOW) library(foreach) testfunc-function(x){

[R] Return level plots

2012-09-21 Thread MichelleNCSU
Hello, First of all, let me apologize that my statistics background is modest at best. I am doing some extreme value analysis on model output (WRF) which have the following dimensions: speed(time,lat,lon) I am trying to fit the GPD (gpd.fit) to each point (time,lat,lon) to get a return level

[R] using neural network in R (nnet)

2012-09-21 Thread myweb mail
Hi all, I have considered neural network to classify the health status of the cow. I found a very neatly written R codes for classification method in herehttp://home.strw.leidenuniv.nl/~jarle/IAC/RRoutines/classification-example.R . It would be very helpful if you can answer some of the

Re: [R] Math expression in R plot

2012-09-21 Thread arun
Hi, Try this: plot(0,0)  title(expression(paste(plain(Estimator vs. ),eta,sep= ))) A.K. - Original Message - From: li li hannah@gmail.com To: r-help r-help@r-project.org Cc: Sent: Friday, September 21, 2012 11:04 AM Subject: [R] Math expression in R plot Dear all,   In my R

Re: [R] correlating matrices

2012-09-21 Thread frauke
Thank you for the fast help! I am not sure though if I understand the predict.lm business. The newdata that I would make predictions from consists of six matrices, one for each variable. Do I cbind the matrices like you suggest for the regression and then convert them to a dataframe? How does R

[R] BRugs has a bug to use OpenBUGS_PATH

2012-09-21 Thread Shuguang Sun
Hi, When I used BRugs (Version 0.8.0), I found a bug about the findOpenBUGS way using OpenBUGS_PATH. I don't know how to contact the developer, so I think someone here may help me. The issue is: I want to use OpenBUGS/BRugs in a portable way in windows, so I set the environment variable

Re: [R] BRugs has a bug to use OpenBUGS_PATH

2012-09-21 Thread R. Michael Weylandt
On Fri, Sep 21, 2012 at 7:00 PM, Shuguang Sun shugu...@gmail.com wrote: Hi, When I used BRugs (Version 0.8.0), I found a bug about the findOpenBUGS way using OpenBUGS_PATH. I don't know how to contact the developer, so I think someone here may help me. The easiest way to get in touch when

Re: [R] effective way to return only the first argument of which()

2012-09-21 Thread Rui Barradas
Hello, Since no one took the bait, I've written some C code and run some tests. The tests are divided in two parts, one uses a random vector 'x', the other makes sure the condition will only be met at the end.v See below. But first 1. Like Bert said, now your data. I've tested Milan's code,

Re: [R] Return level plots

2012-09-21 Thread R. Michael Weylandt
On Fri, Sep 21, 2012 at 3:17 PM, MichelleNCSU mlcip...@ncsu.edu wrote: Hello, First of all, let me apologize that my statistics background is modest at best. I am doing some extreme value analysis on model output (WRF) which have the following dimensions: speed(time,lat,lon) I am trying

Re: [R] Return level plots

2012-09-21 Thread David Winsemius
On Sep 21, 2012, at 7:17 AM, MichelleNCSU wrote: Hello, First of all, let me apologize that my statistics background is modest at best. I am doing some extreme value analysis on model output (WRF) which have the following dimensions: speed(time,lat,lon) How is this object

[R] SAS

2012-09-21 Thread li li
Dear all, Does any one know whether there is a help forum for sas? I know this is not relevant question to ask here but don't know where else to ask. Thank you. Hannah [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Math expression in R plot

2012-09-21 Thread David Winsemius
On Sep 21, 2012, at 8:19 AM, arun wrote: Hi, Try this: plot(0,0) title(expression(paste(plain(Estimator vs. ),eta,sep= ))) A.K. Will not throw an error, but perpetuates the misconception that plotmath paste() has a 'sep' argument. The space comes from the first argument and the sep

Re: [R] SAS

2012-09-21 Thread R. Michael Weylandt
On Fri, Sep 21, 2012 at 8:48 PM, li li hannah@gmail.com wrote: Dear all, Does any one know whether there is a help forum for sas? I know this is not relevant question to ask here but don't know where else to ask. Thank you. Hannah Dear Hannah, Yes, I suppose this really isn't

[R] reading mzxml files

2012-09-21 Thread Greg Barding
Hi Everyone, So I've been working a little with mzxml files generated from proteomics data. The current packages available to read these are not sufficient for what I am doing and I would like to build my own. The trouble I am having is how do I read in an mzxml file without the available

Re: [R] correlating matrices

2012-09-21 Thread Rui Barradas
Hello, As for the first question, predict.lm with new data uses the formula used in the fit so do not change the way you pass on your new data. If the formula was Y ~ X1 + X2 you can use newdata = data.frame(New1, New2) newdata = data.frame(cbind(New1, New2)) but the order must be kept.

[R] translating SAS proc mixed into R lme()

2012-09-21 Thread Zoya Pyrkina
Dear R users, I need help with translating these SAS codes into R with lme()? I have a longitudinal data with repeated measures (measurements are equally spaced in time, subjects are measured several times a year). I need to allow slope and intercept vary. SAS codes are: proc mixed data =

[R] __FILE__ object in R

2012-09-21 Thread Peter Waltman
Hi - I'm curious if there is a way to get access to the location of the calling script within R. I found one way of accessing it from this thread, https://stat.ethz.ch/pipermail/r-devel/2008-April/048914.html, which recommends using either: parent.frame(2)$ofile Or FILE - (function() {

Re: [R] reading mzxml files

2012-09-21 Thread Bhupendrasinh Thakre
A little googling gave me the result of package caMassClass. Have you checked that. Best Regards, Bhupendrasinh Thakre Sent from my iPhone On Sep 21, 2012, at 2:02 PM, Greg Barding gbard...@ucr.edu wrote: Hi Everyone, So I've been working a little with mzxml files generated from

Re: [R] reading mzxml files

2012-09-21 Thread Rui Barradas
Hello, For questions like this, install.packages('sos') # if not yet installed library(sos) # load into R session findFn('mzxml ') The frist two look promising. Hope this helps, Rui Barradas Em 21-09-2012 20:02, Greg Barding escreveu: Hi Everyone, So I've been working a little with

[R] New Submission to CRAN note

2012-09-21 Thread Christopher Desjardins
Hi, I want to submit a package to CRAN and I am getting the following Note: * checking CRAN incoming feasibility ... NOTE New submission How can I take care of this? And/or is it a big deal? Thanks and sorry if this is something that I easily overlooked I have googled this topic for a while

[R] efficient overlapping average curve on original curves

2012-09-21 Thread eliza botto
Dear useRs, my question could be very basic for which i apologize in advance. Each column of a matrix with dimensions 365 rows and 37 columns was drawn against another matrix of dimensions 365 rows and 1 column. with that i was able to draw 37 curves on the same axis. now i want to draw an

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread Rui Barradas
Hello, Something like this? # Make up some data mat - matrix(rnorm(100*37), ncol = 37) mat - apply(mat, 2, cumsum) avg - rowMeans(mat) # matplot - matrix plot matplot(mat, type = l) lines(avg, lwd = 2) I've also seen some very nice graphics for ploting many lines in ggplot2 using

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread David Winsemius
On Sep 21, 2012, at 4:11 PM, eliza botto wrote: Dear useRs, my question could be very basic for which i apologize in advance. Each column of a matrix with dimensions 365 rows and 37 columns was drawn against another matrix of dimensions 365 rows and 1 column. with that i was able to

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread Rui Barradas
And with ggplot2. library(ggplot2) library(scales) dat - data.frame(id = seq_len(nrow(mat)), mat) dm - reshape2::melt(dat, id = id) dm$variable - as.ordered(dm$variable) dm$avg - rowMeans(mat) p - ggplot(dm, aes(x = id, y = value, group = variable)) p + geom_line(data = dm, colour =

[R] Change boxplot color

2012-09-21 Thread Simone Gabbriellini
Hello, I would like to change the color of the borders of my boxplot. Using col= I am able only to change the inside background of the boxplot, while I would like to have it transparent andchange the border instead. Any hint aamore than welcome, Best, Simone Inviato da iPhone

Re: [R] Change boxplot color

2012-09-21 Thread Bert Gunter
?boxplot ... and note the border argument -- Bert On Fri, Sep 21, 2012 at 6:57 PM, Simone Gabbriellini simone.gabbriell...@gmail.com wrote: Hello, I would like to change the color of the borders of my boxplot. Using col= I am able only to change the inside background of the boxplot, while I

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread arun
HI, Similar graph in xyplot: set.seed(1) mat - matrix(rnorm(100*37), ncol = 37) mat - apply(mat, 2, cumsum) mat1-melt(mat) library(latticeExtra) p0-xyplot(value~X1,group=X2,data=mat1,type=l,ylab=mat1) p1-xyplot(aggregate(mat1,list(mat1$X1),function(x)

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread arun
HI, Modified version of ggplot() library(ggplot2) set.seed(1) mat1-melt(mat) new1-aggregate(mat1,list(mat1$X1),function(x) mean(x))[,4] mat2-within(mat1,{X2-as.factor(X2)})