Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread iliketurtles
Your code works! strangelines.txt was created, and it's a text file with just spacebars ... Seems like a few thousand lines of complete blanks (not 1 non-blank entry). One thing, when I ran your code there was an error message; > setwd("C:/Users/admin/Desktop/hons/Thesis") > con <- file("dataset

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread Rui Barradas
Ok, I think I've got it this time. The problem was that you have two different types of data in the same data structure, the first row are the result's column names, then the actual numeric data. First, in what follows I've called your data.frame 'df1', df1 <- structure(list(A2 = structure(c(9L,

[R] what is Non-numeric argument to mathematical function in prediction ?

2012-05-04 Thread kiinalist
Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. > m <- naiveBayes(iris[,1], iris[,5]) > table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric argument to mathematical function

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Spencer Graves
On 5/4/2012 9:27 PM, Duncan Murdoch wrote: On 12-05-04 10:33 PM, Joshua Wiley wrote: On Fri, May 4, 2012 at 7:17 PM, Duncan Murdoch wrote: On 12-05-04 7:40 PM, Spencer Graves wrote: [snip] This is almost enough to drive a person to join the "I hate MicroSoft" fan club. I think that

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Duncan Murdoch
On 12-05-04 10:33 PM, Joshua Wiley wrote: On Fri, May 4, 2012 at 7:17 PM, Duncan Murdoch wrote: On 12-05-04 7:40 PM, Spencer Graves wrote: [snip] This is almost enough to drive a person to join the "I hate MicroSoft" fan club. I think that would just confirm my membership in the "I

Re: [R] testing parallel slopes assumption for Ordinal Logistic Regression

2012-05-04 Thread Juliet Hannah
See the post by Frank Harrell at: http://groups.google.com/group/medstats/browse_thread/thread/cbff7871179e9508?pli=1 or google regrouping to satisfy proportional odds On Tue, May 1, 2012 at 2:14 AM, 80past2 wrote: > Hi everyone, I'm a bit new here (and new to R), and I was trying to do an > O

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Joshua Wiley
On Fri, May 4, 2012 at 7:17 PM, Duncan Murdoch wrote: > On 12-05-04 7:40 PM, Spencer Graves wrote: [snip] >>        This is almost enough to drive a person to join the "I hate >> MicroSoft" fan club. > > I think that would just confirm my membership in the "I hate Emacs" club. I don't see how th

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Duncan Murdoch
On 12-05-04 7:40 PM, Spencer Graves wrote: On 5/4/2012 5:41 AM, Duncan Murdoch wrote: On 12-05-04 12:41 AM, Spencer Graves wrote: On 5/3/2012 9:28 PM, Joshua Wiley wrote: How are you using R? Any special front ends that might be causing this? Can you try it in unsuffered consequences?

Re: [R] Cannot read or write to file in Linux Ubuntu

2012-05-04 Thread John
On Thu, 3 May 2012 10:50:46 -0800 John Kane wrote: > Thanks Jeff and Sarah. > > I was thinking mainly of using the base path and paste routine which > is something I do in Windows > > It will take me a while to figrue out relative paths. > Relative paths are not a mystery nor are they so

Re: [R] uneven vector length issue with read.zoo?

2012-05-04 Thread Gabor Grothendieck
On Fri, May 4, 2012 at 3:37 PM, knavero wrote: > "However, I do wonder why it still complains of the vector length even though > I nulled out the other columns. It's an interesting error to run into. > Probably looks at FUN before nulling out the other columns was my theory. " > > Referring to jus

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Spencer Graves
On 5/4/2012 5:41 AM, Duncan Murdoch wrote: On 12-05-04 12:41 AM, Spencer Graves wrote: On 5/3/2012 9:28 PM, Joshua Wiley wrote: How are you using R? Any special front ends that might be causing this? Can you try it in unsuffered consequences? I'm running R 1.15.0; sessionInfo() ap

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread marc212
structure(list(A2 = structure(c(9L, 4L, 4L, 3L, 5L, 7L, 5L, 7L, 6L, 1L, 1L, 1L, 3L, 4L, 5L, 5L, 2L, 5L, 3L, 4L, 4L, 8L, 4L, 3L, 4L, 5L, 4L, 3L), .Label = c("4.957", "4.958", "4.959", "4.96", "4.961", "4.962", "4.963", "4.964", "x"), class = "factor"), A2.1 = structure(c(6L, 2L, 2L, 2L, 2L,

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread Rui Barradas
Hello, again. marc212 wrote > > I have a pretty good computer with a lot of RAM and it just wont run this > code. My R crashes... > > Running this on a sample does not work either. > > Any advice? Thank you for all the help! > > Marc > What I'm saying is to use dput on a data sample. For ins

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread Rui Barradas
Hello, marc212 wrote > > I am not opposed to for loops just do not know how to implement them. > > > I am sorry for all the questions I am trying to learn. The posted code > does not work for me in my set I am getting a : > Error in `dimnames<-.data.frame`(`*tmp*`, value = list(c("A1", "A1.1"

Re: [R] uneven vector length issue with read.zoo?

2012-05-04 Thread knavero
"However, I do wonder why it still complains of the vector length even though I nulled out the other columns. It's an interesting error to run into. Probably looks at FUN before nulling out the other columns was my theory. " Referring to just a straight up read.zoo in this case ^ -- View this mes

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread marc212
I am not opposed to for loops just do not know how to implement them. I am sorry for all the questions I am trying to learn. The posted code does not work for me in my set I am getting a : Error in `dimnames<-.data.frame`(`*tmp*`, value = list(c("A1", "A1.1", : invalid 'dimnames' given for d

Re: [R] ANOVA problem

2012-05-04 Thread rob.griffin.247
Thanks Richard, that works great on the test data, I'll try it out on the full dataset now and let you know how it goes. Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/ANOVA-problem-tp4609062p4609400.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread Rui Barradas
Hello, marc212 wrote > > I have the following: > Time A1 A1 B1 B1 C1 C2 > x y x y x y > 0 5 6 6 7 7 9 > 1 3 4 4 3 9 9 > 2 5 2 6 4 7 4 > > I wan

Re: [R] ANOVA problem

2012-05-04 Thread rob.griffin.247
Gee Bert, thanks for the really helpful tip. But if you read my post properly you'll note that I do know how ANOVA's work. > The anova of *G* /AB01 /would be some thing like: y=V, fixed=S, Random= L > & > L*S... I didn't want to show a full model formula in case it led people do the wrong path to

Re: [R] uneven vector length issue with read.zoo?

2012-05-04 Thread knavero
Hey Gabor, just trying to understand this here..sorry for the noob question: DF1 <- read.table(URL, skip = 1, header = TRUE, sep = ",", fill = TRUE, as.is = TRUE) I'm not to familiar with as.is, however I quickly read the R documentation on that. From my understanding it converts character to

Re: [R] uneven vector length issue with read.zoo?

2012-05-04 Thread knavero
Thank you for the suggestion Gabor. It's definitely more elegant than what I had above. Instead of going from character representation to POSIXct to chron, it looks at the character representation and goes straight to chron. It's good. However, I do wonder why it still complains of the vector lengt

Re: [R] Finding local maxima on a loess surface

2012-05-04 Thread Diego Rojas
Thanks, I know about it but i wat to find several local maxima, so in other words I need a way to identify the places in the surface where both slopes are equal to 0 and the second derivative is negative. On Fri, May 4, 2012 at 9:28 AM, David Winsemius wrote: > > On May 3, 2012, at 6:09 PM, Dieg

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread Petr Savicky
On Fri, May 04, 2012 at 11:11:47AM -0700, marc212 wrote: > I have something like 28 rows and 6000 columns. How would I configure this > with for loops. The transformation may be splitted into simpler pieces using a for loop over the 28 rows. Try the following. orig <- rbind( "0"=c(5, 6, 6, 7

Re: [R] estimation problem

2012-05-04 Thread Petr Savicky
On Fri, May 04, 2012 at 07:43:32PM +0200, Kehl Dániel wrote: > Dear Petr, > > thank you for your input. > I tried to experiment with (probably somewhat biased) truncated means > like in the following code. > How I got the 225 as a truncation limit is a good question. :) > > REPS1 <- REPS2 <- 100

Re: [R] auditing R's memory usage

2012-05-04 Thread jim holtman
Here is a function I use to look at the size of objects: ##start my.ls <- function (pos = 1, sorted = FALSE, envir = as.environment(pos)) { .result <- sapply(ls(envir = envir, all.names = TRUE), function(..x) object.size(eval(as.symbol(..x), envir = envir))) if

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread Jan van der Laan
OK, not all, but most lines have the same length. Perhaps you could write the lines with a different line size to a separate file to have a closer look at those lines. Modifying the previous code (again not tested): con <- file("dataset.txt", "rt") out <- file("strangelines.txt", "wt") #

Re: [R] ANOVA problem

2012-05-04 Thread Richard M. Heiberger
The following constructs the data.frame that I think the original poster asked for. I don't understand the graph, so I didn't attempt it. I agree with Bert that this might not make sense. Specifically, the distinction between AB01 and AB02 is not modeled, and that is probably the critical factor.

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread marc212
I have something like 28 rows and 6000 columns. How would I configure this with for loops. Thank you. Marc -- View this message in context: http://r.789695.n4.nabble.com/Breaking-up-a-Row-in-R-transpose-tp4607658p4609309.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Textwrangler Languages Folder

2012-05-04 Thread bastian
This is quite some time ago, but I just had the same problem and the folder in the most recent version of TextWrangler. Right-click (well, Ctrl-click) on the application and choose 'Show Package Contents'. Then you can find the folder Language Moudles and include the plist script for R syntax highl

[R] France Model

2012-05-04 Thread Silvano
Hi, I need fit the France model : y = A{1 - exp[-b(t-T) - c(sqrt(t) - sqrt(T))]} parameters: A, b, T, c variable: t (time) resp: y I tried: time = 1:48 resp = rnorm(48, 200, 10) dados = data.frame(resp, time) attach(dados) f = function(x, A, b, T, c) A*(1-exp(-b*(x-T) - c*(sqrt(x) - sqrt(T

Re: [R] Binomial GLM, chisq.test, or?

2012-05-04 Thread Tal Galili
Without going deeply into your analysis, 2 comments: 1) Use the anova command to test two nested models using: anova(model1, model2, test="Chisq") 2) glm's are non-trivial models (at least to me), be sure to google for some tutorials in order to understand what you are looking at... Cheers, Tal

Re: [R] Replacing tick labels in a plot

2012-05-04 Thread Robert Latest
Hello Sarah, thanks for your quick answer. This is exactly what I was looking for, embarrassingly simple if I might add. Sometimes R is like a huge workshop with unlabeled tool magazines: You know the tool exists, but not where it is. And if you find it, the instructions are often quite terse. Th

Re: [R] estimation problem

2012-05-04 Thread Kehl Dániel
Dear Petr, thank you for your input. I tried to experiment with (probably somewhat biased) truncated means like in the following code. How I got the 225 as a truncation limit is a good question. :) REPS1 <- REPS2 <- 1000 N1 <- 10 N2 <- 3 N <- N1+N2 x1 <- rep(0,N1) x2 <- rnorm(N2,300,10

[R] Converting code from gee() to geeglm()

2012-05-04 Thread Stefán Hrafn Jónsson
Dear R users Recently I received advice from this fine group on gee() and sample weights One suggestion was to use geeglm() I hope someone can help me to solve a problem that arises when converting a code from gee to geeglm. *Here is a code that I wrote with the original data, not weighted:

Re: [R] ANOVA problem

2012-05-04 Thread Bert Gunter
Rob: On Fri, May 4, 2012 at 9:18 AM, robgriffin247 wrote: > Hi, > I need to create a data frame containing the results of a number of ANOVA's > but I'm having some trouble setting it up (some being enough for me to spend > 3 days trying with no progress and be left staring in to the abyss which >

Re: [R] Replacing tick labels in a plot

2012-05-04 Thread Sarah Goslee
What about ?axis as a place to start? Are you sure that the email address that your message appears to be coming from is identical to the one you used when you signed up? That's a frequent cause of moderation. Sarah On Fri, May 4, 2012 at 1:09 PM, Robert Latest wrote: > Hello, > > is it possibl

[R] Replacing tick labels in a plot

2012-05-04 Thread Robert Latest
Hello, is it possible to replace the text of tick marks in a plot? Specifically, I'd like to have a ppnorm plot in which the theoretical quantiles are not expressed in terms of standard deviations, but in actual percentages. Anybody who's seen a probability plot in MINITAB knows what I'm talking a

Re: [R] sem error message

2012-05-04 Thread Sarah Goslee
Hi, You did a really good job providing a reproducible example, except that you didn't mention which package sem() comes from. (sem, I'm assuming). I don't know how you came up with your covariance matrix, but it *isn't* symmetric: > isSymmetric(S.Seed.BB) [1] FALSE > S.Seed.BB[6, 2] [1] 37.758

[R] Off-Topic: Crime Statistics Don't Pay

2012-05-04 Thread Bert Gunter
WARNING: COMPLETELY OFF TOPIC -- Nothing to do with R. I thought readers of this list might enjoy the following. The link to the full article is at the bottom. I hope this is not "too" inappropriate. --- Overconfidence in crime statistics doesn’t pay. In a new study, a team of criminologists

Re: [R] Problems Exporting R Output to an xls file need help

2012-05-04 Thread R. Michael Weylandt
As it says, you need to supply a file name to be outputted to. write.xls(, file = "abc.xls") Michael On Fri, May 4, 2012 at 11:31 AM, PaulJr wrote: > Hello R users, > > I want to export to an xls or .csv some predictions I produced with the > auto.arima and forecast functions. > > A detail

[R] auditing R's memory usage

2012-05-04 Thread Alexander Shenkin
Hi Folks, I'm running 32-bit R 2.14 in RStudio on my Win 7 x64 system with 8GB RAM. I'm getting memory problems as R wants to swallow more than the 4GB limit. I think I'm stuck at 4GB as I have to use 32-bit R for a number of packages (ODBC, etc). However, I doubt I really need to be using that

[R] add an automatized linear regression in a function

2012-05-04 Thread Rui Barradas
Em 04-05-2012 11:00, jeff6868 escreveu: Date: Thu, 3 May 2012 06:45:59 -0700 (PDT) From: jeff6868 To:r-help@r-project.org Subject: [R] add an automatized linear regression in a function Message-ID:<1336052759474-4606047.p...@n4.nabble.com> Content-Type: text/plain; charset=us-ascii Dear R users

[R] ANOVA problem

2012-05-04 Thread robgriffin247
Hi, I need to create a data frame containing the results of a number of ANOVA's but I'm having some trouble setting it up (some being enough for me to spend 3 days trying with no progress and be left staring in to the abyss which some people call a weekend, and what I will call 2 quiet days in the

Re: [R] text replacement with a loop in a script file

2012-05-04 Thread Rui Barradas
Hello, diegogiri wrote > > Hi, i'm a new r user and I will take you a simple (not for me)question. > I have a r script file like this: > > text <- c(" ") > > I have a csv file like: > NAME > alfa > beta > gamma > > how can I replace with a loop statment metadata "" o

[R] Binomial GLM, chisq.test, or?

2012-05-04 Thread lincoln
Hi, I have a data set with 999 observations, for each of them I have data on four variables: site, colony, gender (quite a few NA values), and cohort. This is how the data set looks like: > str(dispersal) 'data.frame': 999 obs. of 4 variables: $ site : Factor w/ 2 levels "1","2": 1 1 1 1 1 1

[R] sem error message

2012-05-04 Thread Vero Chillo
Hello, I tried to do a 'sem' analysis for data of how blueberry consumption by birds is influenced by a pollution gradient, using distance and vegetation structural and composition variables, but I got the following error message: Error in sem.default(ram = ram, S = S, N = N, param.names = pars, v

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread iliketurtles
Hi David, I've tried using sep="\t" but it doesn't work, unfortunately. Thanks for your help. - Isaac Research Assistant Quantitative Finance Faculty, UTS -- View this message in context: http://r.789695.n4.nabble.com/Can-t-import-this-4GB-DATASET-tp4607862p4608936.html Sent from the

[R] text replacement with a loop in a script file

2012-05-04 Thread diegogiri
Hi, i'm a new r user and I will take you a simple (not for me)question. I have a r script file like this: text <- c(" ") I have a csv file like: NAME alfa beta gamma how can I replace with a loop statment metadata "" of script file with the values names in the csv file?

[R] Problems Exporting R Output to an xls file need help

2012-05-04 Thread PaulJr
Hello R users, I want to export to an xls or .csv some predictions I produced with the auto.arima and forecast functions. A detail of all my work is presented below. I loaded a package called dataframes2xls and tried to use the function write.xls without any success. Can anybody help me figure

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-05-04 Thread krtek
You should to download this package and install it: http://cran.r-project.org/bin/windows/base/R-2.15.0patched-win.exe You can find it in R website > Download R for Windows > base > Other builds -- View this message in context: http://r.789695.n4.nabble.com/7-arguments-passed-to-Internal-identi

Re: [R] Interweaving of two datasets

2012-05-04 Thread Rui Barradas
Hello, lunarossa wrote > > I have two datasets, the first has this shape (each word is a column) > Name address phone .. .. > > The second one has the following shape > Name request > > I need a contingency table with for example phone and request. > > > The people registered in these datase

[R] epitools question

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat <- matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) <- c("treatmentA","treatmentB") row.names(mat) <- paste("Cond",rep(1:10,1)) dimnames(mat) <- list("Condition" = row.names(mat), "instrument" = colna

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-05-04 Thread jcolomb
I have the same problem installing R on a new machine, my codes are nor working anymore (same error message as you had). Unfortunately, I do not understand what you mean by R patched and especially "updating R-patched" and google cannot help me this time... May you explain what I have to do? thank

[R] oddsratio and some basic help on epitools

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat <- matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) <- c("treatmentA","treatmentB") row.names(mat) <- paste("Cond",rep(1:10,1)) dimnames(mat) <- list("Condition" = row.names(mat), "instrument" = colna

[R] weird predict function error when I use naive bayes

2012-05-04 Thread kiinalist
Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. m<- naiveBayes(iris[,1], iris[,5]) table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric argument to mathematical function How

[R] Interweaving of two datasets

2012-05-04 Thread lunarossa
I have two datasets, the first has this shape (each word is a column) Name address phone .. .. The second one has the following shape Name request I need a contingency table with for example phone and request. The people registered in these datasets are present in both datasets, BUT in the fi

[R] lme or lmer for unbalance data

2012-05-04 Thread agent dunham
Dear community, I'd like to fix a mixed model. I have unbalance data, what should i use: lme in nlme package , or lmer in lme4. Thanks, u...@host.com as u...@host.com -- View this message in context: http://r.789695.n4.nabble.com/lme-or-lmer-for-unbalance-data-tp4608425.html Sent from the R h

[R] Machine Learning and Cluster-Correlated Data

2012-05-04 Thread Yohann Mansiaux
Dear R-help, I'm trying to apply machine learning methods, such as Random Forest, Boosted Trees or Multivariate Adaptive Regression Splines for supervised classification issues. In a epidemiological study, i'm dealing with high dimensional cluster-correlated data, each cluster corresponding

[R] R crash when i'm using lme function

2012-05-04 Thread gaiarrido
When I try to adjust a mixed model with random effects I can make this order without problem > lm.FA<-lme(absFA~trait*condition,random=~1|individual) But if I try to fit a model in which the response (absFA) is not the same in all individuals at different levels of "trait" factor , but varies ran

Re: [R] Summing list with NA elements

2012-05-04 Thread Dimitris Rizopoulos
one solution is to set NAs to 0, e.g., m <- matrix(1:3, 3, 3) x <- list(m, m+3, m+6) x[[1]][1] <- NA x. <- lapply(x, function (x) {x[is.na(x)] <- 0; x} ) Reduce("+", x.) I hope it helps. Best, Dimitris On 5/4/2012 11:19 AM, Evgenia wrote: I have a list ( in my real problem a double list y

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread iliketurtles
Jan, thank you. > table(line_sizes) line_sizes 01 97 256 1430 2860 46869069 1430 - Isaac Research Assistant Quantitative Finance Faculty, UTS -- View this message in context: http://r.789695.n4.nabble.com/Can-t-import-this-4GB-DATASET-tp4607862p4

[R] oddsratio epitool and chi-square

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat <- matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) <- c("treatmentA","treatmentB") row.names(mat) <- paste("Cond",rep(1:10,1)) dimnames(mat) <- list("Condition" = row.names(mat), "instrument" = colna

[R] add an automatized linear regression in a function

2012-05-04 Thread Rui Barradas
Em 04-05-2012 11:00, jeff6868 escreveu: Date: Thu, 3 May 2012 06:45:59 -0700 (PDT) From: jeff6868 To:r-help@r-project.org Subject: [R] add an automatized linear regression in a function Message-ID:<1336052759474-4606047.p...@n4.nabble.com> Content-Type: text/plain; charset=us-ascii Dear R users

Re: [R] Generate strings from multiple variables

2012-05-04 Thread Bert Gunter
... as in: outer(paste("A",A,sep=""),paste("B".B,sep=""), FUN =paste,sep="_") -- Bert On Fri, May 4, 2012 at 7:59 AM, Bert Gunter wrote: > ?outer > > Bert > > Sent from my iPhone -- please excuse typos. > > On May 4, 2012, at 6:25 AM, "R. Michael Weylandt" > wrote: > >> do.call(function(x,y)

Re: [R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread Rainer Schuermann
You cannot avoid the hyphen I think, but if you say (for example): "prefix.string=foo/x" then your files start with 'x-' (so 'graph' becomes 'foo/x-graph') which may be better for you than the hyphen at the beginning of the file name. Rgds, Rainer On Friday 04 May 2012 17:23:58 julia.jacob...@

Re: [R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread Yihui Xie
I guess that is hard-coded in Sweave, so you probably cannot control it unless you (partially) rewrite the driver. And just FYI, you can try the knitr package, which does not add the hyphen for you, but the name of the option 'prefix.string' has been changed to 'fig.path' (http://yihui.name/knitr/o

Re: [R] Error with the 'segmented' package for R

2012-05-04 Thread Vito Muggeo (UniPa)
dear Szymon, it is a bug (in the new version), thanks. It depends on the flat underlying relationship you are trying to estimate with a small sample.. I will correct it as soon as possible. Meanwhile you can use o1<-glm(gpp ~ temp) os1<-segmented(o1, seg.Z=~temp, psi=15, control=seg.control(n.

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread David Winsemius
On May 4, 2012, at 10:52 AM, Saurav Pathak wrote: On 05/04/2012 10:39 AM, David Winsemius wrote: On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when

Re: [R] Summing list with NA elements

2012-05-04 Thread Evgenia
I agree with you. I used this "trick" to take the desired results but I posted wondering If there was any other solution. Thanks Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Summing-list-with-NA-elements-tp4608167p4608955.html Sent from the R help mailing list arc

Re: [R] Correct Interpretation of survreg() coeffs

2012-05-04 Thread David Winsemius
On May 4, 2012, at 9:43 AM, wwreith wrote: Am I correct in assuming that the output below essentially translates to "Males have a mean time that is significantly lower than Females"? Is this the correct way to interpret the fact that the coefficient is negative? I wouldn't be using exac

[R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread julia . jacobson
Dear Sweave users, Could you help me to find a way to place Sweave output files in a subdirectory of the currentfolder without giving them a subname? If the option "prefix.string=foo/" is used, all files are placed in this folder, but begin with an hyphen-minus, which makes it difficult to work

Re: [R] read-in, error???

2012-05-04 Thread William Dunlap
You didn't mention it, but did you use something like options(digits=20) before displaying that data? In any case, > 1.4000244 == 1.4 [1] TRUE because R uses the IEEE-754 double precision floating point arithmetic that all modern computers support. That gives you 5

Re: [R] Generate strings from multiple variables

2012-05-04 Thread Bert Gunter
?outer Bert Sent from my iPhone -- please excuse typos. On May 4, 2012, at 6:25 AM, "R. Michael Weylandt" wrote: > do.call(function(x,y) paste0("A",x,"_","B",y),expand.grid(x = A,y = B)) > > seems to be a place to start. Robust generalization seems a hair > tricky -- I'll mull on it. > > Mi

Re: [R] Why does RODBC driver returns garbage from Sybase server on new windows 7 machine?

2012-05-04 Thread Marc Schwartz
On May 4, 2012, at 2:38 AM, Alok Jadhav wrote: > Hi, > > I am trying to query a Sybase database on my new windows 7 machine. I am > using native sybase driver "Adaptive server Enterprise" following is example > code > > conn <- sprintf("driver=Adaptive server > Enterprise;server=PHKSESMD01;d

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread Saurav Pathak
On 05/04/2012 10:39 AM, David Winsemius wrote: On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l<- loess(d~x+y, span=span, se=

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread David Winsemius
On May 4, 2012, at 1:34 AM, iliketurtles wrote: Dear Experienced R Practitioners, I have 4GB .txt data called "dataset.txt" and have attempted to use *ff, bigmemory, filehash and sqldf *packages to import it, but have had no success. The readLines output of this data is: Ther alignment o

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread David Winsemius
On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l<- loess(d~x+y, span=span, se=TRUE) p<- predict(l, se=TRUE) I don't know

Re: [R] Finding local maxima on a loess surface

2012-05-04 Thread David Winsemius
On May 3, 2012, at 6:09 PM, Diego Rojas wrote: If a run a LOESS model and then produce a smoothed surface: Is there any way to determine the coordinates of the local maxima on the surface? ?predict# it has a loess method. [[alternative HTML version deleted]] -- David Winsem

[R] Fwd: read-in, error???

2012-05-04 Thread Sarah Goslee
Hi Istvan, Your OS and version of R (eg sessionInfo() ) would also be useful, as would sending your reply to the R-help list and not just to me. Sarah -- Forwarded message -- From: Istvan Nemeth Date: Fri, May 4, 2012 at 10:20 AM Subject: Re: [R] read-in, error??? To: Sarah Gos

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-04 Thread csrabak
Em 4/5/2012 06:39, Bjørn-Helge Mevik escreveu: rakeshnb writes: [snipped] When in doubt, read the documentation. :) An obvious candidate for a fortune entry! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] read-in, error???

2012-05-04 Thread Sarah Goslee
Hi Istvan, That's most unusual, and quite unlikely (and much larger than the usual floating-point rounding errors). Please provide a reproducible example. I assume you got the data from here: http://www.itl.nist.gov/div898/strd/anova/SmLs07.dat What did you do with it then? How did you delete th

[R] read-in, error???

2012-05-04 Thread Istvan Nemeth
Dear Users! I encountered with some problem in data reading while I challenged R (and me too) in a validation point of view. In this issue, I tried to utilize some reference datasets ( http://www.itl.nist.gov/div898/strd/index.html). And the result departed a bit from my expectations. This dataset

Re: [R] GAM, how to set qr=TRUE

2012-05-04 Thread Ben quant
Solution: have package mgcv loaded when you predict...not just for the fit. :) Silly mistake... Thanks Simon! Ben On Thu, May 3, 2012 at 3:56 PM, Ben quant wrote: > Hello, > > I don't understand what went wrong or how to fix this. How do I set > qr=TRUE for gam? > > When I produce a fit using

[R] latex, Hmisc with MikTeX 2.8 produced "n&missing&unique" output

2012-05-04 Thread Durant, James T. (ATSDR/DCHI/SSB)
Hi - So when I run the following, I get a strange formatting output with MikTeX, and I am unsure if the behavior is due to R, Hmisc, or MikTeX or both: dfr <- data.frame(x=rnorm(400),y=sample(c('male','female'),400,TRUE)) latex(describe(dfr)) What happens is that the x column is summarized in

[R] Correct Interpretation of survreg() coeffs

2012-05-04 Thread wwreith
Am I correct in assuming that the output below essentially translates to "Males have a mean time that is significantly lower than Females"? Is this the correct way to interpret the fact that the coefficient is negative? Assume the variale sex is treated as a factor with Female =0 and Male=1. survm

Re: [R] Generate strings from multiple variables

2012-05-04 Thread R. Michael Weylandt
do.call(function(x,y) paste0("A",x,"_","B",y),expand.grid(x = A,y = B)) seems to be a place to start. Robust generalization seems a hair tricky -- I'll mull on it. Michael On Fri, May 4, 2012 at 9:10 AM, Johannes Radinger wrote: > Hi, > > it is easiest to explain what I want to do by an example

[R] Generate strings from multiple variables

2012-05-04 Thread Johannes Radinger
Hi, it is easiest to explain what I want to do by an example: lets assume there are two factors/variables: A <- c(1,2,3) B <- c(1,3,3) Now I would like to generate a list of strings that should look like ("A1_B1","A1_B2","A2_B1","A2_B2"). So actually the string contains all possible combinations

Re: [R] Identifying the particular X or Y in a sorted list

2012-05-04 Thread John Kane
simply change the specification in the subset command to >0 John Kane Kingston ON Canada -Original Message- From: shankarla...@gmail.com Sent: Thu, 3 May 2012 16:51:50 -0400 To: jrkrid...@inbox.com Subject: Re: [R] Identifying the particular X or Y in a sorted l

Re: [R] GAM, how to set qr=TRUE

2012-05-04 Thread Simon Wood
Which version of gam are you using (i.e. which package and version number?) prediction with fitted gam objects should call predict.gam, and I'm not quite sure why this is not happening here (you do have the mgcv or gam loaded while trying to predict, I suppose?). On 03/05/12 22:56, Ben quant

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Duncan Murdoch
On 12-05-04 12:41 AM, Spencer Graves wrote: On 5/3/2012 9:28 PM, Joshua Wiley wrote: How are you using R? Any special front ends that might be causing this? Can you try it in unsuffered consequences? I'm running R 1.15.0; sessionInfo() appears below. I get this from Rgui i386 and

[R] Absolute cumulative curve with ecdf/stepfun?

2012-05-04 Thread Johannes Radinger
Hi, I have two variables ranging both from 0 to 1 (n=500 each). Now I am interested in plotting them both in one plot (using ggplot2). So far I used ecdf() (from an example I found with google) to get values for the cumulatice distribution function which gives a relative curve. I also want to do

Re: [R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Thanks Petr, I'll take a look at that as well. Cheers, Gavin. -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: 04 May 2012 13:09 To: Gavin Blackburn Cc: r-help@r-project.org Subject: Re: [R] colours in a pdf Hi One option for substantial distinguishable range

Re: [R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Ok great, thanks for the help. I don't mind sectioning data off into smaller groups in this early stage, but the more I can get in one group the better. Cheers, Gavin. -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: 04 May 2012 13:04 To: Gavin Bla

Re: [R] colours in a pdf

2012-05-04 Thread Petr PIKAL
Hi One option for substantial distinguishable range of colours is jet.colors from matlab package. Regards Petr > Hi, > > Thanks for the help. Extending the palette to 16 or 20 would be a big > help. The largest number of files I've had to handle in a single group is > 42 and I wouldn't ex

Re: [R] colours in a pdf

2012-05-04 Thread R. Michael Weylandt
I'm not sure you'll be able to come up with 42 categorial colors: perhaps facetting / small-multiples here? Colorspace (on CRAN) will let you make palettes manually, so perhaps that's worth looking at. Michael On Fri, May 4, 2012 at 7:49 AM, Gavin Blackburn wrote: > Hi, > > Thanks for the help.

Re: [R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Hi, Thanks for the help. Extending the palette to 16 or 20 would be a big help. The largest number of files I've had to handle in a single group is 42 and I wouldn't expect it to get much bigger than that. I'll take a look at RColorBrewer. Cheers, Gavin. -Original Message- From: R. M

Re: [R] colours in a pdf

2012-05-04 Thread R. Michael Weylandt
How many colors are you looking for? There are limits to how many the eye can make out, but perhaps the RColorBrewer package would be a place to start. Also check out: http://colorbrewer2.org/ To see all the builtin colors, you can simply use the colors() function, but your viewer won't be able to

[R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Hi, I'm plotting PDFs and have a problem. If I have more than 8 sources of data the colours are repeated. These plots are used to remove poor data from the sets so it would be helpful if I could expand the colour range. Is there any way to do this? The plots are coloured by defining a vector c

Re: [R] Summing list with NA elements

2012-05-04 Thread R. Michael Weylandt
Inelegant, but this is one way: Reduce(function(e1, e2){e1[is.na(e1)] <- 0; e2[is.na(e2)] <- 0; (e1 + e2)}, x) I.e., set the NAs to 0 before adding in the reduce function. Michael On Fri, May 4, 2012 at 5:19 AM, Evgenia wrote: > I have a list ( in my real problem  a double list y[[1:24]][[1:15

Re: [R] (no subject)

2012-05-04 Thread R. Michael Weylandt
quantile(myvec, 0.9) See ?quantile for the 9 different empirical quantile methods provided. Michael On Thu, May 3, 2012 at 2:20 PM, Drew Duckett wrote: > If i am not mistaking the quantile function and percentile function and the > same other than the way they are expressed in R.  I think where

  1   2   >