Re: [R] how to find near neighbors?

2010-11-19 Thread Hans W Borchers
Czerminski, Ryszard astrazeneca.com> writes: > > I am looking for an efficient way to find near neighbors... > > More specifically... > I have two sets of points: A & B and I want to find > points in set B which are closer to set A than some > cutoff (or n-closest) > > I will appreciate very m

Re: [R] An empty grey diagram

2010-11-19 Thread Stephen Liu
ToothGrowth attach(ToothGrowth) abline(lm(len ~ does, data = ToothGrowth)) an empty gray graph displayed continue plot.new() the background changes to white colour, still an empty graph B.R. satimis - Original Message From: Joshua Wiley To: Stephen Liu Cc: r-help@r-project.org

Re: [R] Bold plot axis

2010-11-19 Thread Greg Snow
Often when things look to small/thin it is because the plot is being created at too large a size, then shrunk. How are you creating the graph? How are you transferring it? Try creating the graph at the exact size that it will be when used in the powerpoint, then without needing to resize things

Re: [R] An empty grey diagram

2010-11-19 Thread Joshua Wiley
On Fri, Nov 19, 2010 at 9:35 PM, Stephen Liu wrote: > Hi David, > > >> What happens when you follow the directions... i.e. type: >> plot.new()    #??? > > abline(lm(len ~ dose, data = ToothGrowth)) > plot.new() > > The grey background changes to white, still an empty graph You cannot just use abl

Re: [R] An empty grey diagram

2010-11-19 Thread Stephen Liu
Hi Josh, plot.new() the gray background changes to white colour. If following my steps:- plot(matrics$resid) plots a new graph B.R. Stephen - Original Message From: Joshua Wiley To: Stephen Liu Cc: r-help@r-project.org Sent: Sat, November 20, 2010 12:57:41 PM Subject: Re: [R] An e

Re: [R] An empty grey diagram

2010-11-19 Thread Stephen Liu
Hi David, > What happens when you follow the directions... i.e. type: > plot.new()#??? abline(lm(len ~ dose, data = ToothGrowth)) plot.new() The grey background changes to white, still an empty graph If continue on my version:- abline(matrics) plot(matrics$resid) It plots a graph B.R. St

Re: [R] An empty grey diagram

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 11:14 PM, Stephen Liu wrote: Hi Josh, with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) ToothGrowth abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called y

Re: [R] An empty grey diagram

2010-11-19 Thread Joshua Wiley
It looks like all the packages you should need are loaded. Does the call to plot() create a scatter plot correctly? abline() adds a line to the current plot so that device still needs to be open when you call abline() (which it should have been if you ran the code from my first email). If a grap

Re: [R] how to apply sample function to each row of a data frame?

2010-11-19 Thread wangwallace
> this is a simple question, but I wasn't able to figure it out myself. > > here is the data frame: > > M P Q > 1 2 3 > 4 5 6 > 7 8 9 > > M, P, Q each represent a variable > > I want to draw 2 random sample from each row separately to create a new > data frame. how can I do it? > > thanks!! sor

Re: [R] An empty grey diagram

2010-11-19 Thread Stephen Liu
Hi Josh, > with(ToothGrowth, plot(dose, len)) > abline(lm(len ~ dose, data = ToothGrowth)) ToothGrowth abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet ToothGrowth attach(ToothGrowth) abline(lm(len

Re: [R] An empty grey diagram

2010-11-19 Thread Stephen Liu
Hi Josh, > sessionInfo() R version 2.12.0 (2010-10-15) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252   [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C  [5] LC_TIME=English_Un

Re: [R] An empty grey diagram

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 11:29 PM, Joshua Wiley wrote: Hi Stephen, In a session where that code returns an error, can you report the full results of: sessionInfo() capabilities() ? Josh On Fri, Nov 19, 2010 at 8:14 PM, Stephen Liu wrote: Hi Josh, with(ToothGrowth, plot(dose, len)) abline

Re: [R] An empty grey diagram

2010-11-19 Thread Joshua Wiley
Hi Stephen, In a session where that code returns an error, can you report the full results of: sessionInfo() capabilities() ? Josh On Fri, Nov 19, 2010 at 8:14 PM, Stephen Liu wrote: > Hi Josh, > > >> with(ToothGrowth, plot(dose, len)) >> abline(lm(len ~ dose, data = ToothGrowth)) > > ToothGr

Re: [R] How to do a probability density based filtering in 2D?

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 9:40 PM, Emmanuel Levy wrote: Hello David, I thought about this at first as well, e.g., x1.lim = quantile(x1,prob=c(0.05,0.95)) y2.lim = quantile(y2,prob=c(0.05,0.95)) x1.sub = x1[ x1 > x1.lim[1] & x1 < x1.lim[2] & y2 > y2.lim[1] & y2 < y2.lim[2]] y2.sub = y2[ x1 > x1

[R] Error in solve.default(V, W) with ProDenICA and the required sample size for stable result

2010-11-19 Thread Randel
Hi ALL, Recently I confronted with a error in using package ProDenICA, when let khttp://finzi.psych.upenn.edu/R/library/ProDenICA/html/ProDenICA.html), Error in solve.default(V, W) : 'b' must be compatible with 'a' I have examined the code of function ProDenICA(), but could not find the reason.

Re: [R] How to do a probability density based filtering in 2D?

2010-11-19 Thread Emmanuel Levy
Hello Roger, Thanks for the suggestions. I finally managed to do it using the output of kde2d - The code is pasted below. Actually this made me realize that the outcome of kde2d can be quite influenced by outliers if a boundary box is not given (try running the code without the boundary box, e.g.

Re: [R] An empty grey diagram

2010-11-19 Thread Joshua Wiley
Hi Stephen, Please try: with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) Cheers, Josh On Fri, Nov 19, 2010 at 6:44 PM, Stephen Liu wrote: > Hi folks, > > Win7 64bit > R 1.12.0 > > I run following command on R:- > >> ToothGrowth >> attach(ToothGrowth) >> plot(dose

[R] An empty grey diagram

2010-11-19 Thread Stephen Liu
Hi folks, Win7 64bit R 1.12.0 I run following command on R:- > ToothGrowth > attach(ToothGrowth) > plot(dose,len) > matrics=lm(len~dose) > abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed wi

Re: [R] How to do a probability density based filtering in 2D?

2010-11-19 Thread Emmanuel Levy
Hello David, I thought about this at first as well, e.g., x1.lim = quantile(x1,prob=c(0.05,0.95)) y2.lim = quantile(y2,prob=c(0.05,0.95)) x1.sub = x1[ x1 > x1.lim[1] & x1 < x1.lim[2] & y2 > y2.lim[1] & y2 < y2.lim[2]] y2.sub = y2[ x1 > x1.lim[1] & x1 < x1.lim[2] & y2 > y2.lim[1] & y2 < y

Re: [R] Job scheduling in R

2010-11-19 Thread Jeffrey Spies
Cron still works, but launchd/launchctl seems to be preferred by some if you're on Mac OS X. J. On Fri, Nov 19, 2010 at 7:09 PM, Steve Lianoglou wrote: > Hi, > > On Fri, Nov 19, 2010 at 10:09 AM, amit jain wrote: >> Hi All, >> >> Can anyone point to any package/resouce to schedule a job in R wh

Re: [R] How to do a probability density based filtering in 2D?

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 8:44 PM, Emmanuel Levy wrote: Hello, This sounds like a problem to which many solutions should exist, but I did not manage to find one. Basically, given a list of datapoints, I'd like to keep those within the X% percentile highest density. That would be equivalent to retai

Re: [R] simple loop problemo (Geo brownian motion)

2010-11-19 Thread Yihui Xie
Maybe you can consider the brownian.motion() function in the animation package, e.g. library(animation) ani.options(interval = 0.05, nmax = 150) brownian.motion(pch = 21, cex = 5, col = "red", bg = "yellow", main = "Demonstration of Brownian Motion") Or here is another (awkward) example of severa

[R] How to do a probability density based filtering in 2D?

2010-11-19 Thread Emmanuel Levy
Hello, This sounds like a problem to which many solutions should exist, but I did not manage to find one. Basically, given a list of datapoints, I'd like to keep those within the X% percentile highest density. That would be equivalent to retain only points within a given line of a contour plot.

Re: [R] Sweave Dynamic Graph Question

2010-11-19 Thread Yihui Xie
This limitation actually comes from the LaTeX command \includegraphics{}. It is not impossible to insert animations into LaTeX, e.g. you can use the LaTeX package 'animate'. The R package 'animation' has a wrapper saveLatex() which can help you generate a PDF file containing animations, provided y

Re: [R] how to save object created by assign()

2010-11-19 Thread Jinsong Zhao
On 2010-11-19 22:37, Jinsong Zhao wrote: Hi there, When I run the following code, I could get correct objects (with correct values): for(i in 1:6) { #-- Create objects 'r.1', 'r.2', ... 'r.6' -- nam <- paste("r",i, sep=".") assign(nam, 1:i) # save(nam, file = paste(nam, "RData", sep = ".")) }

Re: [R] Grid newbie: aligning & scaling viewports

2010-11-19 Thread Paul Murrell
Hi On 20/11/2010 2:10 p.m., Bryan Hanson wrote: Oh Knowledgeable Ones: I'm working on a project using grid graphics (for the first time). A toy example is given below, run it simply with>foobar() I am wondering why the pink dot and concentric circles are not centered on the 3-color axis syste

[R] Grid newbie: aligning & scaling viewports

2010-11-19 Thread Bryan Hanson
Oh Knowledgeable Ones: I'm working on a project using grid graphics (for the first time). A toy example is given below, run it simply with >foobar() I am wondering why the pink dot and concentric circles are not centered on the 3-color axis system. Further, I feel like the concentric circles don

Re: [R] Job scheduling in R

2010-11-19 Thread Steve Lianoglou
Hi, On Fri, Nov 19, 2010 at 10:09 AM, amit jain wrote: > Hi All, > > Can anyone point to any package/resouce to schedule a job in R which runs a > .R file at a specified time ? > > I couldn't find anything useful in R Reference manual or RSiteSearch. I am > sure its there but i am unable to loc

Re: [R] Sweave Dynamic Graph Question

2010-11-19 Thread Dirk Eddelbuettel
On 19 November 2010 at 13:13, cameron wrote: | | i have a time Series of IBM closing px from 1/1/2000 to today | I want to graph the time serie by dividing the graph by year and month | all the monthly graphs with the same year will go to one page. so from | 1/1/2000 to 11/19/2010. i will have

Re: [R] Sweave Dynamic Graph Question

2010-11-19 Thread Ista Zahn
Hi Cameron, This is a Sweave FAQ: http://www.stat.uni-muenchen.de/~leisch/Sweave/FAQ.html#x1-11000A.9 -Ista On Fri, Nov 19, 2010 at 4:13 PM, cameron wrote: > > i have a time Series of IBM closing px from 1/1/2000 to today > I want to graph the time serie by dividing the graph by year and month >

Re: [R] library(datasets)

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 6:10 PM, Thomas Stewart wrote: You may want to consider using eurodist in matrix form. As in, ED <- as.matrix(eurodist) Then you could manipulate the matrix using standard or homemade functions, like this one: max.matrix <- function(A) { column <- ceiling(which.max(A

Re: [R] library(datasets)

2010-11-19 Thread Thomas Stewart
You may want to consider using eurodist in matrix form. As in, ED <- as.matrix(eurodist) Then you could manipulate the matrix using standard or homemade functions, like this one: max.matrix <- function(A) { column <- ceiling(which.max(A)/nrow(A)) row <- which.max(A) - (column-1)*nrow(A) A

Re: [R] test for causality

2010-11-19 Thread Tayfur
Hi users ı cant find and also do nonlinear garnger causality R codes, Is anyone send me an example??? thanks lots of -- View this message in context: http://r.789695.n4.nabble.com/test-for-causality-tp835483p3050981.html Sent from the R help mailing list archive at Nabble.com. [[alter

[R] Sampling from multi-dimensional kernel density estimation

2010-11-19 Thread Christoph Goebel
Hi, I'd like to use a three-dimensional dataset to build a kernel density and then sample from the distribution. I already used the npudens function in the np package to estimate the density and plot it: fit<-npudens(~x+y+z) plot(fit) It takes some time but appears to work well.

Re: [R] sweep by levels of a factor

2010-11-19 Thread Lancaster, Anthony
Many thanks for your most helpful answers. Tony Lancaster On 18 November 2010 20:28, David Winsemius wrote: > > On Nov 18, 2010, at 1:23 PM, Henrique Dallazuanna wrote: > > Try this also: >> >> x$x - ave(x$x, x$f) >> > > Could also use scale for only its centering capacities: > > unlist( > t

[R] Sweave Dynamic Graph Question

2010-11-19 Thread cameron
i have a time Series of IBM closing px from 1/1/2000 to today I want to graph the time serie by dividing the graph by year and month all the monthly graphs with the same year will go to one page. so from 1/1/2000 to 11/19/2010. i will have 11 pages, and each page will have 12 graphs (jan to dec)

Re: [R] TukeyHSD error

2010-11-19 Thread Steven Ranney
Rescinded. Problem solved. I discovered that TukeyHSD doesn't like numeric factors; changing the "level" to a factor solved my problem. SR Steven H. Ranney steven.ran...@montana.edu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

[R] TukeyHSD error

2010-11-19 Thread Steven Ranney
All - I think I'm being dense, but for the life of me, I can't figure out why I get error message with the code below. I have data that looks like param level perc.surv asin.tran DO 3 0.6864407 0.9764544 DO 3 0.125 0.3613671 DO 3 0.8738739 1.2077299 DO 4 0.4615385 0.7468986 D

Re: [R] autocorrelation in count data

2010-11-19 Thread Kjetil Halvorsen
see http://onlinelibrary.wiley.com/doi/10./j.1467-9892.2010.00684.x/abstract kjetil On Fri, Nov 19, 2010 at 6:02 PM, wrote: > hello, > > I try to model traffic accidents with the following model: > > glm.nb(y~j+w+m+sf+b+ft,data=fr[]). the problem is that there exist > autocorrelation  in th

Re: [R] How to print "graph1.png" "graph2.png" "graph3.png" ... ?

2010-11-19 Thread Soyeon Kim
Yes. This is what I want to do. Thanks! I've tried to paste function but I didn't know how to use appropriately in this case. Have a nice weekend. On Fri, Nov 19, 2010 at 3:05 PM, Jorge Ivan Velez wrote: > Perhaps this? >  paste('graph', 1:10, '.png', sep = "") > Please give us more context/deta

Re: [R] How to print "graph1.png" "graph2.png" "graph3.png" ... ?

2010-11-19 Thread Jorge Ivan Velez
Perhaps this? paste('graph', 1:10, '.png', sep = "") Please give us more context/details on what you are trying to do. I will undoubtedly help us to help you. In this case, the posting guide is your friend. HTH, Jorge On Fri, Nov 19, 2010 at 3:57 PM, Soyeon Kim <> wrote: > Dear All, > > I wa

[R] autocorrelation in count data

2010-11-19 Thread sahin
hello, I try to model traffic accidents with the following model: glm.nb(y~j+w+m+sf+b+ft,data=fr[]). the problem is that there exist autocorrelation in the data. one possibility is to model traffic accidents with inar(1)-models. has anyone an idea how to change this model in order to abta

Re: [R] how to apply sample function to each row of a data frame?

2010-11-19 Thread Petr Savicky
On Fri, Nov 19, 2010 at 10:34:26AM -0800, wangwallace wrote: > > this is a simple question, but I wasn't able to figure it out myself. > > here is the data frame: > > M P Q > 1 2 3 > 4 5 6 > 7 8 9 > > M, P, Q each represent a variable > > I want to draw 2 random sample from each row separatel

[R] How to print "graph1.png" "graph2.png" "graph3.png" ... ?

2010-11-19 Thread Soyeon Kim
Dear All, I want to print out "graph1.png" "graph2.png" "graph3.png" ... How can I print it out? Thank you, __ 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/po

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Yihui Xie
I will appreciate a lot if you do not mind add a new option like 'useFormat'. I suggested format() because I'm "allergic" to too many options. I must say it is not hard to define the formatting, but it is just tedious to do it for every single number because by default we have too many digits espe

[R] memory profiling

2010-11-19 Thread Patrick Leyshock
I'm trying to configure Version 2.12.0 or R to do memory profiling. I've reconfigured the code: % ./compile --enable-memory-profiling=YES and verified that it's configured correctly by examining the output. I then rebuild R: % make Then I fire up R and run a script, using Rprof with the memor

[R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-19 Thread Kjetil Halvorsen
This is very strange. (Debian squeeze, R 2.12.0 compiled from source) I did some moderately large computation (including svd of a 560x50 matrix), running a few minutes, and R memory increasing to about 900MB on this 2 GB ram laptop. I had done Rprof(memory.profiling=TRUE) first. Then doing summary

Re: [R] Integrating functions / vector arithmetic

2010-11-19 Thread Erich Neuwirth
Some remarks: Why are you using assignments to indicate the return values of functions? This is R idiom: > f<-function(u){ > f<-0 > for (j in 1:4){ >f<-f+coeff[j]*(zeta(j)(u)) > } > f > } > If you only want the inner product of 2 vector, "outer" probably is an overkill. g <- function(u){

[R] RGoogleDocs stopped working

2010-11-19 Thread Farrel Buchinsky
Harlan and Tal have had problems. I had lots too. I spent hours getting it to work. Terrible process to go through but RGoogleDocs is so useful that the time was worth it - I think! My problems were overcome when 1. I used the latest zip file by Duncan Temple Lang see below 2. I inserted an

Re: [R] how to apply sample function to each row of a data frame?

2010-11-19 Thread Jorge Ivan Velez
Hi wangwallace, Here are two ways of doing it. Could you please be more specific? # data set X <- matrix(1:9, ncol = 3, byrow = TRUE) colnames(X) <- c('M', 'P', 'Q') X # option 1 -- two samples per row replicate(2, { out <- t(apply(X, 1, sample)) colnames(out) <- colnames(X) list(out) }) #

Re: [R] question about constraint minimization

2010-11-19 Thread Jonathan P Daily
Does ?constrOptim look as though it will handle your needs? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 "Is the room still a room when its empty? Does the room, the thing itself have pur

[R] question about constraint minimization

2010-11-19 Thread dhacade...@gmail.com
Hi, I am a beginner of R. There is a question about constraint minimization. A function, y=f(x1,x2,x3x12), needs to be minimized. There are 3 requirements for the minimization: (1) x2+x3+...+x12=1.5 (x1 is excluded); (2) x1=x3=x4; (3) x1, x3 and x5 are in the range of -1~0, respectively. T

Re: [R] simple loop problemo (Geo brownian motion)

2010-11-19 Thread Duncan Murdoch
On 19/11/2010 1:09 PM, newbster wrote: I would like to plot multiple random walks onto the same graph. My p variable dictates how may random walks there will be. par(mfrow=c(1,1)) p<- 100 N<- 1000 S0<- 10 mu<- 0.03 sigma<- 0.2 nu<- mu-sigma^2/2 x<- matrix(rep(0,(N+1)*p),nrow=(N+1)) y<- matrix(

[R] how to apply sample function to each row of a data frame?

2010-11-19 Thread wangwallace
this is a simple question, but I wasn't able to figure it out myself. here is the data frame: M P Q 1 2 3 4 5 6 7 8 9 M, P, Q each represent a variable I want to draw 2 random sample from each row separately to create a new data frame. how can I do it? thanks!! -- View this message in conte

[R] simple loop problemo (Geo brownian motion)

2010-11-19 Thread newbster
I would like to plot multiple random walks onto the same graph. My p variable dictates how may random walks there will be. par(mfrow=c(1,1)) p <- 100 N <- 1000 S0 <- 10 mu <- 0.03 sigma <- 0.2 nu <- mu-sigma^2/2 x <- matrix(rep(0,(N+1)*p),nrow=(N+1)) y <- matrix(rep(0,(N+1)*p),nrow=(N+1)) t<-

[R] Color Alaska in USA map

2010-11-19 Thread Xin Sun
Hello: I have a problem when I tried to color the USA map with different colors. The following is my data (I only used the second column of data): alaska,1, 2 Hawaii, 0, 0 USA,5, 5 And here is my code: library("latticeExtra") library("mapproj") state<-read.table

Re: [R] Calculating distance between longitude, latitude of 2 points

2010-11-19 Thread MacQueen, Don
Also spDists spDistsN1 Euclidean or Great Circle distance between points In the sp package. (and in my personal opinion, the sp package would be a good place to start, since it’s part of a group of packages I view as R’s core packages for working with spatial data) -Don On 11/19/10 5:

Re: [R] calculating martingale residual on new data using "predict.coxph"

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 12:50 PM, David Winsemius wrote: On Nov 19, 2010, at 12:32 PM, Shi, Tao wrote: Hi list, I was trying to use "predict.coxph" to calculate martingale residuals on a test data, however, as pointed out before What about resid(fit) ? It's my reading of Therneau & Gramsc

Re: [R] calculating martingale residual on new data using "predict.coxph"

2010-11-19 Thread Shi, Tao
Hi David, Thank you for the quick reply! resid(fit) only gives the residuals on the training data not on test data. ...Tao - Original Message > From: David Winsemius > To: "Shi, Tao" > Cc: r-help@r-project.org; dieter.me...@menne-biomed.de; r_ting...@hotmail.com > Sent: Fri, No

Re: [R] RGoogleDocs stopped working

2010-11-19 Thread Tal Galili
I second Harlan's call. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Claudia Beleites
Dear all, I don't like the current behaviour, but that change could break a lot of existing documents. Since you can easily wrap your Sexpr arguments in a call to whatever formatting function you want, why force all of those users to change their documents? I'm someone who would change a whole l

Re: [R] Set colour in tcl variable

2010-11-19 Thread Phil Spector
Immanuel - I don't believe you can associate a color with a TclVar, but you can use tkconfigure to change the color of a label. Does this little program help? library(tcltk) base = tktoplevel() lab = tklabel(base,text='correct',foreground='green') tkpack(lab) red = function(...)tkconfigure(lab

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Henrik Bengtsson
Just to get the message through that some already tried, e.g. on Windows 7 with R (Rterm) you get: > cat("\u2591","\u2592","\u2593") ¦ ¦ ¦> > See it didn't even cut'n'paste the same visual symbols as I see in Rterm but I guess you cannot see that. Make sense? No? Point is, expect issues if yo

Re: [R] calculating martingale residual on new data using "predict.coxph"

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 12:32 PM, Shi, Tao wrote: Hi list, I was trying to use "predict.coxph" to calculate martingale residuals on a test data, however, as pointed out before What about resid(fit) ? It's my reading of Therneau & Gramsch [and of help(coxph.object) ] that they consider thos

Re: [R] how do I build panel data/longitudinal data models with AR terms using the plm package or any other package

2010-11-19 Thread Jude Ryan
Hi Giovanni, Thanks a lot for your input. I will explore using 'nlme' and 'lme4'. I had read your paper early on and was hoping, for reasons outlined in your paper regarding the differences in approaches and jargon between statisticians and econometricians ..., I could do what I needed with the

[R] calculating martingale residual on new data using "predict.coxph"

2010-11-19 Thread Shi, Tao
Hi list, I was trying to use "predict.coxph" to calculate martingale residuals on a test data, however, as pointed out before http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html predict(mycox1, newdata, type="expected") is not implemented yet. Dieter suggested to use 'cph' and 'predict

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 11:45 AM, Jeff Newmiller wrote: The glyphs displayed depend on the "terminal" you are using, which may be operating-system dependent. Beware of assuming that other people will see the same things you do in their consoles. On a Mac this: > cat("\u2591","\u2592","\u259

Re: [R] predict() an rpart() model: how to ignore missing levels in a factor

2010-11-19 Thread jamessc
many thanks - that's perfect, excluding records on a rep-by-rep basis is what I was just hoping for but I probably didn't explain myself that well! James -- View this message in context: http://r.789695.n4.nabble.com/predict-an-rpart-model-how-to-ignore-missing-levels-in-a-factor-tp3049218p3050

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Jeff Newmiller
The glyphs displayed depend on the "terminal" you are using, which may be operating-system dependent. Beware of assuming that other people will see the same things you do in their consoles. "Mark Heckmann" wrote: >just found it out. >to get an overview: > >for (i in 2590:3000) > cat(eval

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
just found it out. to get an overview: for (i in 2590:3000) cat(eval(parse(text=paste("\"\\u", i, "\"", sep="" Thanks, Mark Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna: > In the plot window: > > plot(1, main = "\u2591\u2592\u2593") > > > On Fri, Nov 19, 2010 at 2:02 PM, Mark

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
is it also possible on the console? that is what i am actually interested in? Thanks in advance! Mark Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna: > In the plot window: > > plot(1, main = "\u2591\u2592\u2593") > > > On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann > wrote: > Hi, > > can

[R] Set colour in tcl variable

2010-11-19 Thread Immanuel Seeger
Hello all, using package tcltk this is my problem: I want to set a colour of a tclVar(). I have a tklabel (fixed in position) which should display two variables occasionally. If a constraint is fulfilled, the tklabel should display correct<-tclVar('correct') in green, otherwise it should di

Re: [R] Job scheduling in R

2010-11-19 Thread Whit Armstrong
http://hudson-ci.org/ give hudson a try. It's incredibly easy to set up, and handles job dependencies and notifications for job failures. Its suggested use case is for automated software builds, but it fits the role of scheduled jobs (and interjob dependencies) very well. -Whit On Fri, Nov 19

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Henrique Dallazuanna
In the plot window: plot(1, main = "\u2591\u2592\u2593") On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann wrote: > Hi, > > can the R console print all extended ASCII characters? > I am especially interested in characters 176-178 from > http://www.asciitable.com/ > bottom table. > As far as I kn

Re: [R] Odp: Still confused with lapply

2010-11-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.11.2010 16:58:01: > PtitBleu > > Hello Petr, > > Your solution works well with my example. > But with the function I want to use (which calls another functions), I still > have errors. > I have to work on it again (but only on monday). > > Again

[R] Odp: how to improve this inefficient R code for imputing missing values

2010-11-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.11.2010 16:34:04: Without going too deeply to your code, try to check na.locf function from zoo package. I would split your data to list according to study and subject, use na.locf with respect to your miising value types > x<-c(NA, 1:5) > y<-rev(

Re: [R] Job scheduling in R

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 10:09 AM, amit jain wrote: Hi All, Can anyone point to any package/resouce to schedule a job in R which runs a .R file at a specified time ? That wouldn't be an R function but rather a system function, wouldn't it? I couldn't find anything useful in R Reference ma

[R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
Hi, can the R console print all extended ASCII characters? I am especially interested in characters 176-178 from http://www.asciitable.com/ bottom table. As far as I know the character mapping in R is somewhat different (octal). So as I am not familiar with these things I am not sure if it

Re: [R] Function call on every prompt

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 10:38 AM, Marc Schwartz wrote: What's wrong with: options(prompt = paste(format(Sys.time(), "%a %b %d %X %Y %Z"), ">")) Fri Nov 19 09:30:53 2010 CST> Fri Nov 19 09:30:53 2010 CST> Fri Nov 19 09:30:53 2010 CST> That one doesn't get updated with every prompt. Duncan Mur

Re: [R] Odp: Still confused with lapply

2010-11-19 Thread PtitBleu
Hello Petr, Your solution works well with my example. But with the function I want to use (which calls another functions), I still have errors. I have to work on it again (but only on monday). Again thank you, Ptit Bleu. PS : I have access to all the functions but I don't want to modify all of

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Duncan Murdoch
On 19/11/2010 10:38 AM, Dieter Menne wrote: Duncan Murdoch-2 wrote: > > On 19/11/2010 10:12 AM, Yihui Xie wrote: >> Maybe this should go to R-devel as a wishlist: >> val<- format(eval(parse(text=cmd), envir=.GlobalEnv)) >> > I don't like the current behaviour, but that change co

[R] printCoefmat() for a data.frame with factors

2010-11-19 Thread Michael Friendly
I want to use something like printCoefmat() in a print.summary method to print a more nicely formatted version of the result from a summary method, but where the estimates may be cross-classified by one or more factors. However, printCoefmat() assumes that the labels for the parameters are the

Re: [R] Function call on every prompt

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 10:23 AM, Barry Rowlingson wrote: Someone on stackoverflow.com was wondering how to display the current time in the R prompt. I could have swore there was a mechanism for hooking a function into R such that it is was called before the ">" prompt was given, but no amount of s

[R] Odp: Still confused with lapply

2010-11-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.11.2010 15:41:08: > > Hello, > > I would like to replace a for loop with lapply in order to speed up the > treatment of my data (I've read lapply can help to do it). Not exactly. For loop if correctly written can be as quick as lapply. See P.Burns

Re: [R] Function call on every prompt

2010-11-19 Thread Barry Rowlingson
On Fri, Nov 19, 2010 at 3:36 PM, Duncan Murdoch wrote: > Barry was probably remembering SweaveHook. The key is the "taskCallbackManager". Does exactly what it says on the tin. Doesn't come up with any of my search strings! Hopefully now this is in R-help it'll come up when people search for

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Dieter Menne
Duncan Murdoch-2 wrote: > > On 19/11/2010 10:12 AM, Yihui Xie wrote: >> Maybe this should go to R-devel as a wishlist: >> val<- format(eval(parse(text=cmd), envir=.GlobalEnv)) >> > I don't like the current behaviour, but that change could break a lot of > existing documents. >

Re: [R] Function call on every prompt

2010-11-19 Thread Marc Schwartz
On Nov 19, 2010, at 9:36 AM, Duncan Murdoch wrote: > On 19/11/2010 10:31 AM, Marc Schwartz wrote: >> On Nov 19, 2010, at 9:23 AM, Barry Rowlingson wrote: >> >> > Someone on stackoverflow.com was wondering how to display the current >> > time in the R prompt. I could have swore there was a mech

Re: [R] Function call on every prompt

2010-11-19 Thread Duncan Murdoch
On 19/11/2010 10:31 AM, Marc Schwartz wrote: On Nov 19, 2010, at 9:23 AM, Barry Rowlingson wrote: > Someone on stackoverflow.com was wondering how to display the current > time in the R prompt. I could have swore there was a mechanism for > hooking a function into R such that it is was called

[R] problems with rJava

2010-11-19 Thread R Heberto Ghezzo, Dr
Hello, using r-2.12.0 on a Toshiba laptop with Win7 I am trying to install JGR, iut installs OK but when loading, complains about rJava so I did: > install.packages("rJava") Installing package(s) into ‘I:\R\cran’ (as ‘lib’ is unspecified) trying URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/window

[R] how to improve this inefficient R code for imputing missing values

2010-11-19 Thread Coen van Hasselt
Hello all, I have a big data.frame multiple studies, subjects and timepoints per subject, i.e. STUDY[,1] SUBJECT[,2] .. WT[,16] HT[,17] TEMP[,18] BSA[,19] 1 150 170 37 1.90 1 1NA

Re: [R] Function call on every prompt

2010-11-19 Thread Marc Schwartz
On Nov 19, 2010, at 9:23 AM, Barry Rowlingson wrote: > Someone on stackoverflow.com was wondering how to display the current > time in the R prompt. I could have swore there was a mechanism for > hooking a function into R such that it is was called before the ">" > prompt was given, but no amount

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Duncan Murdoch
On 19/11/2010 10:12 AM, Yihui Xie wrote: Maybe this should go to R-devel as a wishlist: Can we change as.character() to format() in this line in src/library/utils/R/Sweave.R? val<- as.character(eval(parse(text=cmd), envir=.GlobalEnv)) i.e. val<- format(eval(parse(tex

[R] library(datasets)

2010-11-19 Thread lgpeco
## i have one question anouth this package.. library(datasets) eurodist ## if i type this i get max distance between european cities > max(eurodist) [1] 4532 ## but i would like get something like this: 4532 Gilbratar - Anthens ## and another one.. ## if a live in barcelona and i would like trav

Re: [R] Still confused with lapply

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 10:00 AM, PtitBleu wrote: Thanks for your answer but do you have a solution using the function ? I need to you use the data frame with a function (not the one given). I do not think lapply is the *apply you want. since it will individually access the columns and you app

[R] Function call on every prompt

2010-11-19 Thread Barry Rowlingson
Someone on stackoverflow.com was wondering how to display the current time in the R prompt. I could have swore there was a mechanism for hooking a function into R such that it is was called before the ">" prompt was given, but no amount of searching in R's docs, R's source, or RSiteSearch can find

Re: [R] Option to Print with numbers formatted

2010-11-19 Thread Duncan Murdoch
On 19/11/2010 9:59 AM, Santosh Srinivas wrote: Hello group, I have a data frame called test.df with a bunch of columns. When I do a print(test.df), I want the numbers to appear a pre-defined setting. I believe this can be achieved by sprintf but this needs to be done individually for the data

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Yihui Xie
Maybe this should go to R-devel as a wishlist: Can we change as.character() to format() in this line in src/library/utils/R/Sweave.R? val <- as.character(eval(parse(text=cmd), envir=.GlobalEnv)) i.e. val <- format(eval(parse(text=cmd), envir=.GlobalEnv)) I guess this wo

[R] Job scheduling in R

2010-11-19 Thread amit jain
Hi All, Can anyone point to any package/resouce to schedule a job in R which runs a .R file at a specified time ? I couldn't find anything useful in R Reference manual or RSiteSearch. I am sure its there but i am unable to locate. Thanks for your help. Puneet _

Re: [R] RGoogleDocs stopped working

2010-11-19 Thread Harlan Harris
Any new thoughts on this? I really want to get this working again! Is there someone else that can help or somewhere else I should be asking? Thanks! -Harlan On Wed, Nov 17, 2010 at 10:16 AM, Harlan Harris wrote: > Following up again. I found on the forums for the Google Apps API this > threa

Re: [R] Still confused with lapply

2010-11-19 Thread PtitBleu
Thanks for your answer but do you have a solution using the function ? I need to you use the data frame with a function (not the one given). Thanks in advance again. Ptit Bleu. -- View this message in context: http://r.789695.n4.nabble.com/Still-confused-with-lapply-tp3050414p3050455.html Sent

  1   2   >