[R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Jesse Albert Canchola
I'm using R on Windows XP Professional SP2. I figured out the fix for my buffer overflow problem that did not allow me to use Rgui.exe for about two weeks. I would keep getting console not found and even when I uninstalled and re-installed got the same problem. Here's how the problem

[R] write to clipboard under Linux

2006-10-29 Thread Johannes Hüsing
Dear all, I am trying to use the clipboard when writing a table. Typing: write.table(object, file=clipboard) leads to the message: Fehler in file(file, ifelse(append, a, w)) : 'mode' für die Zwischenablage muss unter Unix 'r' sein My interpretation is that I am not allowed to write

[R] Calculating the probability of an event a timeoint t from a Cox model fit

2006-10-29 Thread Inman, Brant A. M.D.
I would like to determine the probability of an event at a specific timepoint given the linear predictor of a given Cox model. For instance, assume that I fit the following model: data(pbc) fit - coxph(Surv(time, status)~ age, data=pbc) To extract the value of the linear predictor for

Re: [R] glmmPQL in 2.3.1

2006-10-29 Thread Christian Gold
I have come across the previous communication on this list in September (copied below) because I had received the same error message. I understand from Brian Ripley's reply that anova should not be used with glmmPQL because it is not an adequate method, and that this is now shown with an error

Re: [R] plot.POSIXct plot.POSIXlt

2006-10-29 Thread Patrick Giraudoux
Hi Spencer, Sorry not to have thought about a self contained example. One can make: dur - c(17, 6, 12, 20, 24, 8, 16, 12, 8, 8, 9, 9, 13, 24, 14, 15, 10, 13, 14, 21, 14, 12, 10, 17, 11, 10, 14, 15, 13, 11, 14, 10, 12, 16, 10) DP - structure(c(1144360800, 1145656800, 1143583200, 1144360800,

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Duncan Murdoch
On 10/29/2006 1:12 AM, Jesse Albert Canchola wrote: I'm using R on Windows XP Professional SP2. I figured out the fix for my buffer overflow problem that did not allow me to use Rgui.exe for about two weeks. I would keep getting console not found and even when I uninstalled and

Re: [R] latex() in Hmisc and n.group

2006-10-29 Thread Johannes Hüsing
This is a bug that has now been fixed. Until a new release of Hmisc appears see the following to get a corrected version of latex( ): http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/LatestRFunctions - you will need getLatestSource('latex') It worked. Many thanks, and apologies for

Re: [R] Measurements of 3000 criminals

2006-10-29 Thread Jean lobry
On that basis, and having looked at Jean's PDF http://pbil.univ-lyon1.fr/members/lobry/R/convergencet.pdf the table on the 11th page thereof (Section 4) seems to be a facsimile reproduction of the corresponding page in the Biometrika article by Macdonell. (I do not have access at the moment to

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Duncan Murdoch
On 10/29/2006 5:52 AM, Duncan Murdoch wrote: On 10/29/2006 1:12 AM, Jesse Albert Canchola wrote: I'm using R on Windows XP Professional SP2. I figured out the fix for my buffer overflow problem that did not allow me to use Rgui.exe for about two weeks. I would keep getting console not

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 5:52 AM, Duncan Murdoch wrote: On 10/29/2006 1:12 AM, Jesse Albert Canchola wrote: Here's how the problem started. In Rgui.exe, I attempted to get more visible output in the buffer (I wanted to be able to scroll up the to

[R] Using predict.glm for classification

2006-10-29 Thread Eleni Rapsomaniki
Dear R users, I'm trying to understand how to derive the actual predictions (in terms of class) using predict.glm. Consider this example: mydf=data.frame(A=sample(rnorm(1000), size=1000, replace=T), B=sample(rnorm(5), size=1000, replace=T), C=sample(rnorm(10), size=1000, replace=T),

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Duncan Murdoch
On 10/29/2006 8:23 AM, Gabor Grothendieck wrote: On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 5:52 AM, Duncan Murdoch wrote: On 10/29/2006 1:12 AM, Jesse Albert Canchola wrote: Here's how the problem started. In Rgui.exe, I attempted to get more visible output in the

[R] Is there any method to do spatial sampling?

2006-10-29 Thread ronggui
I have a map of a district (which is JPG format), and I want to do a sptial sampling based on the map. So is there any function to do spatial sampling of this type? Thanks! -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China 黄荣贵 复旦大学社会学系

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 8:23 AM, Gabor Grothendieck wrote: On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 5:52 AM, Duncan Murdoch wrote: On 10/29/2006 1:12 AM, Jesse Albert Canchola wrote: Here's how the problem started. In

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 8:23 AM, Gabor Grothendieck wrote: On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 5:52 AM, Duncan Murdoch wrote: On 10/29/2006 1:12 AM, Jesse

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Duncan Murdoch
On 10/29/2006 9:55 AM, Gabor Grothendieck wrote: On 10/29/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 8:23 AM, Gabor Grothendieck wrote: On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 5:52 AM, Duncan

Re: [R] Quantile Regression: Measuring Goodness of Fit

2006-10-29 Thread Anupam Tyagi
Hi Martin, Efferz, Martin efferz at finance.uni-mainz.de writes: Hi, how to measure the goodness of fit, when using the rq() function of quantreg? I need something like an R^2 for quantile regression, a single number which tells me if the fit of the whole quantile process (not only for a

[R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Jesse A. Canchola
I'm using R on Windows XP Professional SP2. I figured out the fix for my buffer overflow problem that did not allow me to use Rgui.exe for about two weeks. I would keep getting console not found and even when I uninstalled and re-installed got the same problem. Here's how the problem

[R] Help with unlist

2006-10-29 Thread Michael Kubovy
Dear r-helpers, I have a list whose elements are str(durCut[[1]]) Ord.factor w/ 5 levels vLowlowmed..: 3 2 5 2 2 2 4 4 3 5 ... How do I unlist durCut into an ordered factor? str(unlist(durCut)) int [1:3024] 3 2 5 2 2 2 4 4 3 5 ... _ Professor Michael Kubovy

Re: [R] Help with unlist

2006-10-29 Thread Marc Schwartz
On Sun, 2006-10-29 at 10:43 -0500, Michael Kubovy wrote: Dear r-helpers, I have a list whose elements are str(durCut[[1]]) Ord.factor w/ 5 levels vLowlowmed..: 3 2 5 2 2 2 4 4 3 5 ... How do I unlist durCut into an ordered factor? str(unlist(durCut)) int [1:3024] 3 2 5 2 2 2 4 4

[R] Problem with very old dates

2006-10-29 Thread tom soyer
Hi, I noticed that as.Date() could not convert date string to date type if the dates are very old. For example, if the date string is 1-Mar-50, then as.Date() would convert this to 2050-03-01, NOT 1950-03-01. This seems to be the behavior of as.Date() for dates older than 1969-1-1, and it is not

Re: [R] Problem with very old dates

2006-10-29 Thread Marc Schwartz
On Sun, 2006-10-29 at 10:31 -0600, tom soyer wrote: Hi, I noticed that as.Date() could not convert date string to date type if the dates are very old. For example, if the date string is 1-Mar-50, then as.Date() would convert this to 2050-03-01, NOT 1950-03-01. This seems to be the behavior

Re: [R] Problem with very old dates

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Marc Schwartz [EMAIL PROTECTED] wrote: On Sun, 2006-10-29 at 10:31 -0600, tom soyer wrote: Hi, I noticed that as.Date() could not convert date string to date type if the dates are very old. For example, if the date string is 1-Mar-50, then as.Date() would convert this to

Re: [R] Problem with very old dates

2006-10-29 Thread Marc Schwartz
On Sun, 2006-10-29 at 12:18 -0500, Gabor Grothendieck wrote: On 10/29/06, Marc Schwartz [EMAIL PROTECTED] wrote: On Sun, 2006-10-29 at 10:31 -0600, tom soyer wrote: Hi, I noticed that as.Date() could not convert date string to date type if the dates are very old. For example, if the

Re: [R] Problem with very old dates

2006-10-29 Thread tom soyer
Thanks Marc and Gabor for the clarification. On 10/29/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 10/29/06, Marc Schwartz [EMAIL PROTECTED] wrote: On Sun, 2006-10-29 at 10:31 -0600, tom soyer wrote: Hi, I noticed that as.Date() could not convert date string to date type if

[R] Unexpected behavior of predict and interval=confidence

2006-10-29 Thread Kevin Middleton
Based on some recent r-help discussions, I have been trying out plotting confidence intervals using predict and matplot. Matplot appeared to not be plotting the linear regression when using the default column names generated by read.table (V1, V2, etc). On further inspection, the error

Re: [R] subsetting, aggregating and zoo

2006-10-29 Thread antonio rodriguez
Gabor Grothendieck escribió: Try this: # test data x - c(1:4, 6:8, 10:14) z - zoo(x, as.Date(x)) # idx is 1 for first run, 2 for second run, etc. idx - cumsum(c(1, diff(z) != 1)) # starts replaces each time with the start time of that run # ends is similar but for ends starts -

Re: [R] subsetting, aggregating and zoo

2006-10-29 Thread Gabor Grothendieck
Sorry, the line starting idx - should have time(z) in place of z. That is, year - as.Date(c( 1988-01-13, 1988-01-14, 1988-01-16, 1988-01-20, 1988-01-21, 1988-01-22, 1988-01-25, 1988-01-26, 1988-01-27, 1988-01-28)) x - c( 7.973946, 9.933518, 7.978227, 7.512960, 6.641862, 5.667780,

[R] Rmix package and different distributions

2006-10-29 Thread nelson -
hi all! i want to mix a dataset that is build up from 2 distribution: an exponential and a normal. I can' figure out how can i use Rmix package to do the fitting of my data. Pheraps it si the wrong package? any suggestion? thanks, nelson __

Re: [R] subsetting, aggregating and zoo

2006-10-29 Thread antonio rodriguez
Gabor Grothendieck escribió: Sorry, the line starting idx - should have time(z) in place of z. That is, year - as.Date(c( 1988-01-13, 1988-01-14, 1988-01-16, 1988-01-20, 1988-01-21, 1988-01-22, 1988-01-25, 1988-01-26, 1988-01-27, 1988-01-28)) x - c( 7.973946, 9.933518, 7.978227,

Re: [R] Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife

2006-10-29 Thread Spencer Graves
I can think of two ways to get confidence intervals on intraclass correlations (ICCs) and more accurate intervals for variance components: (1) modifying 'simulate.lme' to store the estimated variance components as well as logLik and (2) using 'lmer' and 'mcmcsamp' in library(lme4).

Re: [R] subsetting, aggregating and zoo

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, antonio rodriguez [EMAIL PROTECTED] wrote: Gabor Grothendieck escribió: Thanks Gabor! Now it's OK (nice the output of dput. I was reluctant to paste all data because is 6575 days long!) You can write the following, say, to display just a bit: dput(z[1:10], control = all)

Re: [R] Mixed conditional logit model

2006-10-29 Thread Spencer Graves
The 'lmer' function in library(lme4) and the 'glmmPQL' function in library(MASS) both will estimate mixed-effects logit / logistic regression models. (If anyone thinks there is a difference between 'logit' and 'logistic regression' models, I hope they will disabuse me of my ignorance.)

Re: [R] subsetting, aggregating and zoo

2006-10-29 Thread antonio rodriguez
Gabor Grothendieck escribió: On 10/29/06, antonio rodriguez [EMAIL PROTECTED] wrote: Gabor Grothendieck escribió: Thanks Gabor! Now it's OK (nice the output of dput. I was reluctant to paste all data because is 6575 days long!) You can write the following, say, to display just a bit:

Re: [R] glmmPQL in 2.3.1

2006-10-29 Thread Ben Bolker
Christian Gold c.gold at magnet.at writes: I have come across the previous communication on this list in September (copied below) because I had received the same error message. I understand from Brian Ripley's reply that anova should not be used with glmmPQL because it is not an

Re: [R] Rmix package and different distributions

2006-10-29 Thread Ben Bolker
nelson - nelson1977 at gmail.com writes: hi all! i want to mix a dataset that is build up from 2 distribution: an exponential and a normal. I can' figure out how can i use Rmix package to do the fitting of my data. Pheraps it si the wrong package? any suggestion? thanks, nelson

[R] identify.hclust() not working for me

2006-10-29 Thread David Farrar
I had a look at the online documentation, and didn't see from that what is my problem. If I should have, pardon me. Here is my session. As I understand the documentation, this should work with only an hclust object. I get a similar error when in include a FUN argument. I am using

[R] error when loading a second session of R

2006-10-29 Thread Leeds, Mark \(IED\)
Hi : Whenever I try to run R in a second session( but not in the same working directory ) , I get the error below Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/u/etlfs/dev/users/leedsmar/res/R/lib/chron/libs/chron.so': /lib/i686/libc.so.6:

Re: [R] Help with random effects and smoothing splines in GAMM

2006-10-29 Thread Spencer Graves
Your random specification 'list(x=~1, s(z,bs=cr)=~1)' generates for me a syntax error. To understand it, please see the documentation for 'list'. The help file for 'list' says, The arguments to |list| or |pairlist| are of the form |value| or |tag=value|, and I believe that 'tag' must

[R] standardized coefficients in lda

2006-10-29 Thread Jeff Miller
Does anyone know if the discriminant coefficients in lda are standardized? Thanks, Jeff [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Rgui.exe fix for console not found buffer overflow problem

2006-10-29 Thread Jesse Albert Canchola
Hi Duncan and Gabor, Many thanks for your responses*. Right, the --vanilla option did not work, as you mention and I had very few clues to go on. Your fix mentioned below should do the trick. Regards and have a great day, Jesse A. Canchola * My apologies for the redundant second post. It

Re: [R] Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife

2006-10-29 Thread Rick Bilonick
On Sun, 2006-10-29 at 11:06 -0800, Spencer Graves wrote: I can think of two ways to get confidence intervals on intraclass correlations (ICCs) and more accurate intervals for variance components: (1) modifying 'simulate.lme' to store the estimated variance components as well as

Re: [R] Get the names of the columns in a tserie

2006-10-29 Thread Spencer Graves
Have you tried 'str(X)' on the 'X' object that 'read.ts' created for you? If you've done that and still can't solve your problem, I suggest you review the Introduction to R manual, available as the first option on the left from the html file you get from 'help.start()'. If that still

Re: [R] Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife

2006-10-29 Thread Spencer Graves
see in line Rick Bilonick wrote: On Sun, 2006-10-29 at 11:06 -0800, Spencer Graves wrote: I can think of two ways to get confidence intervals on intraclass correlations (ICCs) and more accurate intervals for variance snip The way I've done the bootstrapping

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Matthew Walker
Thank you Gabor for that explanation, I can now make a bit more sense of R's behaviour! When I edit boxplot.stats, a new version is copied to my local workspace. I have a few associated questions: 1. This has something to do with namespaces in R, and I know nothing about them. Can anyone point

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Matthew Walker
On Sat, 2006-10-28 at 08:03 -0400, Duncan Murdoch wrote: On 10/27/2006 11:06 PM, Matthew Walker wrote: Hi everyone, I think I have found a minor issue with the R function boxplot.stats. But before I make such a rash comment, I'd like to check my facts by fixing what I think is the

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Duncan Murdoch
On 10/29/2006 6:08 PM, Matthew Walker wrote: On Sat, 2006-10-28 at 08:03 -0400, Duncan Murdoch wrote: On 10/27/2006 11:06 PM, Matthew Walker wrote: Hi everyone, I think I have found a minor issue with the R function boxplot.stats. But before I make such a rash comment, I'd like to check my

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Matthew Walker [EMAIL PROTECTED] wrote: Thank you Gabor for that explanation, I can now make a bit more sense of R's behaviour! When I edit boxplot.stats, a new version is copied to my local workspace. I have a few associated questions: 1. This has something to do with

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/29/2006 6:08 PM, Matthew Walker wrote: On Sat, 2006-10-28 at 08:03 -0400, Duncan Murdoch wrote: On 10/27/2006 11:06 PM, Matthew Walker wrote: Hi everyone, I think I have found a minor issue with the R function boxplot.stats.

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Matthew Walker
On Sun, 2006-10-29 at 18:47 -0500, Duncan Murdoch wrote: [snip] Hi Duncan, Thanks for your reply. How do you know that (i) boxplot.stats lives in the grDevices namespace? getAnywhere(boxplot.stats) starts out as getAnywhere(boxplot.stats) A single object matching

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Gabor Grothendieck
On 10/29/06, Matthew Walker [EMAIL PROTECTED] wrote: On Sun, 2006-10-29 at 18:47 -0500, Duncan Murdoch wrote: [snip] Hi Duncan, Thanks for your reply. How do you know that (i) boxplot.stats lives in the grDevices namespace? getAnywhere(boxplot.stats) starts out as

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Duncan Murdoch
On 10/29/2006 8:01 PM, Matthew Walker wrote: On Sun, 2006-10-29 at 18:47 -0500, Duncan Murdoch wrote: [snip] Hi Duncan, Thanks for your reply. How do you know that (i) boxplot.stats lives in the grDevices namespace? getAnywhere(boxplot.stats) starts out as getAnywhere(boxplot.stats) A

[R] Cannot be coerced to logical?

2006-10-29 Thread Tova Fuller
Hello all, So I am having a puzzling problem. I am working with a 534 x 1065 data frame entitled LocalMaxExpBlue.COR which is completely full of logical values TRUE and FALSE. However, when I attempt to manipulate this data frame, R does not recognize it as logical. Strangely enough,

[R] documenting overridden methods (for S4 classes)

2006-10-29 Thread Rajarshi Guha
Hi, I'm trying to convert a package of mine to S4 classes and am stumbling when trying to correctly document some overriden methods. I have written methods that allow one to use 'length', and various logical operators (|, , etc) on my objects. For example the code for my length method is:

Re: [R] Cannot be coerced to logical?

2006-10-29 Thread Marc Schwartz
On Sun, 2006-10-29 at 18:34 -0800, Tova Fuller wrote: Hello all, So I am having a puzzling problem. I am working with a 534 x 1065 data frame entitled LocalMaxExpBlue.COR which is completely full of logical values TRUE and FALSE. However, when I attempt to manipulate this data

Re: [R] Is there any method to do spatial sampling?

2006-10-29 Thread Milton Cezar Ribeiro
May be this work for rectangular image. require(rimage) img-read.jpeg(file.jpg) image(rgb2grey(img)) nsamples-1000 coordinates-NULL for (i in 1:nsamples) { coordinates-rbind( coordinates, cbind(x=as.integer(nrow(img)*runif(1)), y=as.integer(ncol(img)*runif(1 } But I

Re: [R] Cannot be coerced to logical?

2006-10-29 Thread Tova Fuller
Thank you so much Mark. That was extremely helpful. Problem solved! Tova On Oct 29, 2006, at 7:47 PM, Marc Schwartz wrote: On Sun, 2006-10-29 at 18:34 -0800, Tova Fuller wrote: Hello all, So I am having a puzzling problem. I am working with a 534 x 1065 data frame entitled

Re: [R] Debugging R's code: boxplot.stats

2006-10-29 Thread Matthew Walker
On Sun, 2006-10-29 at 20:18 -0500, Duncan Murdoch wrote: If you're sure your change is a good idea then post a patch here along with an explanation of why it's so good: and it might make it into the next release. Thank you to both Duncan and Gabor, your help was really appreciated. My 10

Re: [R] How to best divide table by table

2006-10-29 Thread Petr Pikal
Hi Assuming the same order in both tables divide only columns you wont and then add column of names. You need to work with data frame, as working with matrices cannot use mixed types columns. tab1-data.frame(letters[1:3], 1:3) tab2-data.frame(letters[1:3], 10)