Re: [R] how to do this trimming/selecting in canonical R?

2013-09-15 Thread gildororonar
Quoting Berend Hasselman b...@xs4all.nl: Your trim-point in B is not unique (at least for the data you provided). Indeed. It's quit a surprise to me. I couldn't figure out why my evaluation expression results in multiple trimp-points In a general way, I am looking for x and y, where:

[R] accumulate() function in R?

2013-09-15 Thread gildororonar
I came from Python, newly learning R. is there something like accumulate() in R? Example: accumulate([1,2,3,4,5]) -- 1 3 6 10 15 Or perhaps I should show the problem. The problem I am trying to solve, is to select elements from X until it accumulate to 30. My solution is: X =

Re: [R] how to do this trimming/selecting in canonical R?

2013-09-15 Thread gildororonar
Quoting Gabor Grothendieck ggrothendi...@gmail.com: Try this: library(sqldf) Thank you for introducing me to SQLDF package! I wasn't aware I could use SQL in R! Right now Arun sent me (forgetting to cc the list) a solution using apply/sapply, which inspired me of my own version: x -

Re: [R] accumulate() function in R?

2013-09-15 Thread Berend Hasselman
On 15-09-2013, at 04:36, gildororo...@mail-on.us wrote: I came from Python, newly learning R. is there something like accumulate() in R? Yes: cumsum Berend Example: accumulate([1,2,3,4,5]) -- 1 3 6 10 15 Or perhaps I should show the problem. The problem I am trying to solve, is to

Re: [R] accumulate() function in R?

2013-09-15 Thread Anthony Damico
maybe ?cumsum z - 1:10 cumsum( z ) z - sort( z ) cumsum( z )[ cumsum( z ) 30 ] On Sat, Sep 14, 2013 at 10:36 PM, gildororo...@mail-on.us wrote: I came from Python, newly learning R. is there something like accumulate() in R? Example: accumulate([1,2,3,4,5]) -- 1 3 6 10 15 Or

Re: [R] Imputation for space-time satellite data

2013-09-15 Thread Michael Sumner
See packages raster, rgdal and spacetime. Also the mailing list R-Sig-Geo which is more relevant for this topic. On Wed, Sep 11, 2013 at 10:02 PM, Eddie Smith eddie...@gmail.com wrote: Dear list, I am trying to do a space-time imputation for time series satellite imageries. Any

Re: [R] Regression model for predicting ranks of the dependent variable

2013-09-15 Thread Frank Harrell
require(rms) ?orm# ordinal regression model For a case study see Handouts in http://biostat.mc.vanderbilt.edu/CourseBios330 Since you have lost the original values, one part of the case study will not apply: the use of Mean(). Frank - I have a dataset which has

[R] Executing a code until a new user input aborts it (readlines?)

2013-09-15 Thread Hadassa Brunschwig
Hi, I know that with readlines you can start executing a code upon user input. What I would like to do is to have the ability to abort a code based on a new user input. E.g. when the user hits enter the code stops running. That is, I would periodically check for a user input and stop the code

Re: [R] rgl snapshot on headless server

2013-09-15 Thread Andreas Maunz
The other write* options seem to limited to me. I am looking for a way to obtain a PS, or at least a PNG, since I develop a web application on a server that needs to grab the screenshot and create a written report with it. Starting my Xvfb like this: Xvfb :5 -screen 0 640x480x24 -ac +extension

Re: [R] rgl snapshot on headless server

2013-09-15 Thread Duncan Murdoch
On 13-09-15 6:02 AM, Andreas Maunz wrote: The other write* options seem to limited to me. I am looking for a way to obtain a PS, or at least a PNG, since I develop a web application on a server that needs to grab the screenshot and create a written report with it. Starting my Xvfb like this:

[R] Downloading data directly from internet

2013-09-15 Thread Ron Michael
Hi,   I need to download data from this site: http://www.cmegroup.com/trading/agricultural/grain-and-oilseed/corn_quotes_globex.html     I tried with following set of codes:     library(RCurl) library(XML)   aa -

Re: [R] GLM result output..

2013-09-15 Thread Lutfor Rahman
Thanks for that. Still I am a bit confused. Please advice me. Now, I have got minimal adequate model keeping all the those significant predictors in the model which is shown below: Coefficients: Estimate Std. Error z value Pr(|z|) (Intercept)

[R] Failed path analysis using sem package

2013-09-15 Thread Yumeng Yue
Dear R users: I am trying to run a path analysis using sem package in R. But I have encountered one problem, below is my code: SEMEX-read.csv(D:/Documents and Settings/z3409964/Desktop/Hospital 1.csv) library(sem) cov.matrixSEMEX-cov(na.omit(SEMEX)) SEMEX-specifyModel() CWB-CWB13,NA,1

Re: [R] DataEllipse versus Ellipse Function in R

2013-09-15 Thread John Fox
Dear Anamika Chaudhuri, On Sat, 14 Sep 2013 21:04:42 -0400 Anamika Chaudhuri canam...@gmail.com wrote: Hi: Does Ellipse and dataellipse function in R produce the same ellipse? I wanted to see how the radius for the Ellipse function in R calculated. Also what is the var-covariance matrix,

Re: [R] Failed path analysis using sem package

2013-09-15 Thread John Fox
Dear Brad, It's impossible to know from the information given whether the model is identified or not. Including a reproducible example of your problem, as the r-help posting guide asks, is a good idea. Assuming that OCB is an observed variable, however, the model is identified, but implausible.

Re: [R] accumulate() function in R?

2013-09-15 Thread arun
Hi, If you have a vector of values to compare: thresh1- c(30,4,12,65,5) indx-findInterval(thresh1-1,cumsum(X)) indx2-ave(rep(indx,indx),rep(indx,indx),FUN=seq)  X[indx2] # [1]  1  3  4  5  8  1  1  3  4  1  3  4  5  8 15  1  3 #you can split this into a list

Re: [R] GLM result output..

2013-09-15 Thread David Winsemius
On Sep 15, 2013, at 2:15 AM, Lutfor Rahman wrote: Thanks for that. Still I am a bit confused. Please advice me. Now, I have got minimal adequate model keeping all the those significant predictors in the model which is shown below: Coefficients: Estimate Std.

[R] Data labels in R

2013-09-15 Thread Ankur Seth
I need to put labels in plot in R. Can someone please help? The labels are in the excel file and loaded into lables library(xlsx) library(zoo) fPTAnalysis-Input.xls data-read.xlsx(fPTAnalysis,9) lables-subset(data, select=c(Labels)) data-subset(data, select=c(Date,col1, col2 ))

Re: [R] Data labels in R

2013-09-15 Thread jim holtman
Read the help file on 'plot' and look at some of the examples to see how to place labels in various places on a plot. This is not difficult if you have read any of the documentation. Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not

Re: [R] Data labels in R

2013-09-15 Thread Ankur Seth
I want to put labels a,b,c,d on the data points x-data.frame(c(1,2,3,4),c(1,4,9,16),c(a,b,c,d), as.Date(c(01-10-2013, 02-10-2013,03-10-2013,04-10-2013), %d-%m-%Y)) colnames(x)-c(x, sq, lables,dates) y-subset(x, select=c(dates,x,sq)) y-read.zoo(y) plot(y, plot.type=single, xlab=Date, ylab=Price)

[R] Instructions for upgrading R on ubuntu

2013-09-15 Thread Andrew Crane-Droesch
I am trying to upgrade to R 3.0.1, and I am working on ubuntu. Apparently, the new version is available in the following ppa: https://launchpad.net/~marutter/+archive/c2d4u. I have added this ppa to my software sources. I then run the typical sudo apt-get update sudo apt-get dist-upgrade,

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread Jeff Newmiller
Apparently? How is this apparent? I don't see this mentioned at CRAN [1]. Why would you reference some perhaps well-intentioned but possibly untrustworthy person's website when you could be downloading from a vetted distribution source? [1] http://cran.us.r-project.org/bin/linux/ubuntu/

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread John Sorkin
Jeff, Andrew, When you come up with a solution to the upgrade problem, please send it to me. I have a similiar problem under Mint, which is an Unbuntu fork. Thank you, John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread Berend Hasselman
On 15-09-2013, at 19:11, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: Apparently? How is this apparent? I don't see this mentioned at CRAN [1]. Why would you reference some perhaps well-intentioned but possibly untrustworthy person's website when you could be downloading from a vetted

Re: [R] Data labels in R

2013-09-15 Thread arun
Hi, Try: lab- as.character(x[,3]) library(lattice) xyplot(y~time(y),type=b,xlab=Date,ylab=Price,scales=list(x=list(at=time(y),labels=format(time(y),%b-%d))), panel=function(x, y, ...) {    panel.xyplot(x, y, ...);    ltext(x=x, y=y, labels= lab, pos=1, offset=1, cex=0.8)})

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread Jeff Newmiller
Ah, my apologies to Mr. Rutter are due then, but a proper reference by the OP would have clarified this. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread Jeff Newmiller
John, the instructions at CRAN have worked for me. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

Re: [R] Downloading data directly from internet

2013-09-15 Thread Ista Zahn
Hi Ron, It looks like the data you want is generated by javascript; if so Rcurl will not be able to retrieve it for you. See http://stackoverflow.com/questions/14491598/how-do-i-download-the-source-code-for-a-webpage and

Re: [R] Deterministic initialization for k-means

2013-09-15 Thread David Carlson
I am not aware of an implementation of the algorithm you describe. If you are not locked to that particular approach, function diana() in package cluster performs polythetic, hierarchical partitioning which could be used to get your starting cluster centers. Scanning over a paper by Su and Dy

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread Andrew Crane-Droesch
Indeed, the instructions at CRAN work (with the small addition that one needs to be a superuser to edit the software sources). The confusion arose because the c2d4u PPA is the main search result when googling upgrade R 3.0.1 ubuntu. Andrew On 09/15/2013 11:04 AM, Jeff Newmiller wrote:

[R] hclust/dendrogram merging

2013-09-15 Thread Joshua Eckman
I am working with protein blocking assays and the end result is a 2D matrix describing which antibodies block the binding of other antibodies to the target antigen.I need to group the antibodies together into bins based on their combined profiles in both the row and column direction.I am able