[R] Problems with large data frames?

2008-12-12 Thread Chris Poliquin
Hi, I recently added another 1,000 observations to a data frame I have for a total of 10,861 observations. Observations are by row and the frame has 15 columns. R now keeps converting certain columns to factors whenever I run regressions and can't seem to figure out the correct scaling

[R] Standard error of mean for aov

2008-12-12 Thread JS . Augustyn
Hi all, I'm quite new to R and have a very basic question regarding how one gets the standard error of the mean for factor levels under aov. I was able to get the factor level means using: summary(print(model.tables(rawfixtimedata.aov,"means"),digits=3)), where rawfixtimedata.aov is my aov m

[R] weird pasting of ".value" when list is returned

2008-12-12 Thread markleeds
could someone explain why the name of FPVAL gets " .value" concatenated onto it when the code below is run and temp is returned. I've been trying to figure this out for too long. It doesn't matter when I put the FPVAL in the return statement. It happens regardless of whether it's first or last.

Re: [R] How to mimic select.list using RGtk2/gWidgetsRGtk2?

2008-12-12 Thread ronggui
Hi, John, Thanks very much. I have another question about gformlayout(). addSettingGUI <- function(container){ Setting <- list(type = "ggroup", horizontal = FALSE, children = list( list(type="fieldset", columns = 1,

Re: [R] How to mimic select.list using RGtk2/gWidgetsRGtk2?

2008-12-12 Thread John Verzani
ronggui gmail.com> writes: > > I want to write a function mimic the function of select.list(), here > is my preliminary version. > > select <- function(x,multiple=TRUE,...){ > ans<-new.env() > g <- gwindow(title=title,wid=200,heigh=500) > x1<-ggroup(FALSE,con=g) > x2<-gtable(x,multiple=multiple

Re: [R] sas.get function in Hmsic 3.4-4 vs. 3.0-12

2008-12-12 Thread David Winsemius
Could the R Windows FAQ 2.16 be relevant? http://cran.r-project.org/bin/windows/base/rw-FAQ.html#R-can_0027t-find-my-file -- D Winsemius On Dec 12, 2008, at 11:34 PM, Larry Ma wrote: Dear R Users, I have just installed R 2.8 today and also updated the Hmisc package to the latest 3.4-4 v

[R] sas.get function in Hmsic 3.4-4 vs. 3.0-12

2008-12-12 Thread Larry Ma
Dear R Users, I have just installed R 2.8 today and also updated the Hmisc package to the latest 3.4-4 version. However, the sas.get function no longer works in the new Hmsic 3.4-4. Below is a sample code and output from the old and new, but the old one worked. Can someone tell me how sas.ge

Re: [R] How do I multiply labeled vectors of numbers?

2008-12-12 Thread Gabor Grothendieck
Define nm as the names to be multiplied and then use mapply on m[-1] and d1[nm] so that the latter's columns are rearranged: > nm <- names(m)[-1] > data.frame(m[1], mapply("*", m[-1], d1[nm])) class feather jet 1 birds 20 20 2 planes 60 40 On Fri, Dec 12, 2008 at 8:02 PM, Bill Mc

Re: [R] simple list question (question withdrawn)

2008-12-12 Thread Barker, Chris
My apology to the list, as it turns out the moment after I hit the send button, I found that the first element in the list was a null. The error message reflects that. > _ > From: Barker, Chris > Sent: Friday, December 12, 2008 6:30 > To:

Re: [R] how to plot implicit functions

2008-12-12 Thread David Winsemius
The answer I have seen before on this list (but cannot find at the moment) was a suggestion to solve for one of the variables in terms of the other two and then plot with standard 3d plotting routines. I also seem to remember that some of the examples in an RGL vignette had examples of grap

Re: [R] simple list question

2008-12-12 Thread Ben Bolker
Barker, Chris wrote: > > > I'd appreciate some tips, I'm making a simple mistake trying to > extract elements from a list of fit objects. > > The following command works, coef( cph.list[[1]] ) , coef( > cph.list[[3]] ) and so forth. These extract regression coefficients > from

[R] Creating a vector

2008-12-12 Thread PDXRugger
Good day all, I am having seom trouble building a simple vector. Below my sample code shows what ime trying to do and i have pointed out where the issue is. What happens not is that a single "TAZDetermine_FEET" is selected by i need multiple values, as many as there are "cands". I am think

[R] simple list question

2008-12-12 Thread Barker, Chris
I'd appreciate some tips, I'm making a simple mistake trying to extract elements from a list of fit objects. The following command works, coef( cph.list[[1]] ) , coef( cph.list[[3]] ) and so forth. These extract regression coefficients from the appropriate list element. When I

[R] Testing predictive power of ARIMA model

2008-12-12 Thread Evan DeCorte
I am trying to make estimates of the predictive power of ARIMA models estimated by the auto.arima() function. I am looping through a large number of time seiries and fitting ARIMA models with the following code. data1 <- read.csv(file = "case.csv", header = T) data <- data1 output = c(1:leng

[R] feather and jet problem

2008-12-12 Thread markleeds
to the person who just asked about the feather and jet problem: i lost your email but below works. there should be a shorter way by avoiding the last statement and doing everything in the lapply but I've had enough of feathers and jets tonight. m <- data.frame(class = c("birds", "planes"), feat

Re: [R] odd behavior when multiplying data frame by an element

2008-12-12 Thread markleeds
disregard my last question. i forgot that d1 was a dataframe and was thinkiing it was a vector. i think i can fix what i was doing now. On Fri, Dec 12, 2008 at 8:52 PM, markle...@verizon.net wrote: could someone explain what is happening below ? I was trying to solve a related question on

[R] odd behavior when multiplying data frame by an element

2008-12-12 Thread markleeds
could someone explain what is happening below ? I was trying to solve a related question on the list and then , as I was solving it, I was getting strange answers and then I noticed below. It's obviously not a bug but I don't get it. Thanks. m <- data.frame(class = c("birds", "planes"), feather

Re: [R] Stepwise regression

2008-12-12 Thread David Winsemius
On Dec 10, 2008, at 8:03 AM, Frank E Harrell Jr wrote: Maithili Shiva wrote: Hi, I have the response variable 'Y' and four predictors say X1, X2, X3 and X4. Assuming all the assmptions like Y follows normal distribution etc. hold and I want to run linear multiple regression. How do I run

Re: [R] How do I multiply labeled vectors of numbers?

2008-12-12 Thread Bill McNeill (UW)
Thanks for the help. Data frames are gradually starting to make sense to me. Here's a related question. I have two data frames, one looks like this: > m <- data.frame(class = c("birds", "planes"), feather = c(1,3), jet = c(2,4)) > m class feather jet 1 birds 1 2 2 planes 3 4

[R] how can I change the format attribute of POSIXct class

2008-12-12 Thread Fernando Bizuet
Hello, I have a POSIXct column in a dataframe, but when I change the value assigment (for instance, VencimientosxDia$fe_ini_ope <- as.Date(fecha) ) automatically change the format attribute with "2008-12-01 06:00:00". How can I drop the hh:mm:ss from format attribute? > str(VencimientosxDia) 'da

Re: [R] candisc plotting

2008-12-12 Thread Michael Friendly
You might try something like do.can <- candisc(do.mod, data=do) plot(do.can) But, in your example there is only one canonical dimension there are only two levels of the factor. In any case, do.can$scores has the scores, so you can try to plot them however you like. For a 1-D plot in a case

Re: [R] Support vector model?

2008-12-12 Thread Niels Richard Hansen
Dear Celine If you are considering using support vector machines in R, you might find it worthwhile to read the paper: http://www.jstatsoft.org/v15/i09/paper Best, Niels Celine Carret wrote: Dear All, Apologies for sending this email to both list, but at this point I'm not sure which one co

[R] RODBC and Microsft Visual C++ Runtime Library

2008-12-12 Thread Fernando Bizuet
Hello, I am using RODBC and some times when I use a sqlSave I recive this message: Microsft Visual C++ Runtime Library RunTime Error! Program C:\Archivo de programa\R\R-2.8.0\bin\Rgui.exe This application has requested the Runtime to terminate it in an unusual way. P

Re: [R] mixed exponential distribution

2008-12-12 Thread David Winsemius
On Dec 10, 2008, at 10:36 AM, Fazekas, Jacob wrote: Good morning, Is there anyway to do Mixed Exponential Distribution in R? require(fortunes) fortune(109) I am trying to load some lag-weighted empirical survival distribution into R and run a mixed exponential on that data. You mig

Re: [R] [Rd] gregexpr - match overlap mishandled (PR#13391)

2008-12-12 Thread Wacek Kusnierczyk
Greg Snow wrote: > Where do you get "should" and "expect" from? All the regular expression > tools that I am familiar with only match non-overlapping patterns unless you > do extra to specify otherwise. One of the standard references for regular > expressions if you really want to understand w

Re: [R] The end of Matlab

2008-12-12 Thread hadley wickham
On Fri, Dec 12, 2008 at 3:08 PM, Vitalie Spinu wrote: > On Fri, 12 Dec 2008 18:27:02 +0100, hadley wickham > wrote: > > >>> or may be just >>> mtcars[cyl>3&last(20)] >>> >>> or this is already too far? >> >> This would be a considerable extension because then the selector would >> need to know ab

Re: [R] aggregate and median

2008-12-12 Thread jim holtman
aggregate(x, list(x$y, x$a), FUN=median, na.rm=TRUE) On Fri, Dec 12, 2008 at 2:13 PM, wrote: > Hello R-experts, > > I have a simple question: how do I aggregate data using the median > function with na.rm = TRUE, i.e. > > aggregate(x, list(x$y, x$z), FUN = '') > > I have tried 'median(x, na.

[R] aggregate and median

2008-12-12 Thread t . raff
Hello R-experts, I have a simple question: how do I aggregate data using the median function with na.rm = TRUE, i.e. aggregate(x, list(x$y, x$z), FUN = '') I have tried 'median(x, na.rm = TRUE)' but that doesn't help. Any suggestions are very much appreciated, Thorsten __

[R] How can we predict differences in a slope, given that the random component was significant?

2008-12-12 Thread Sachi Ito
Dear R users, Using R lme function, I found that both fixed and random effects of variable A on variable B are significant. Now, I'd like to analyze what variables are predicting differences in the slope. In other words, I'd like to know what variables (e.g., variable C) are predicting individua

[R] Trellis margins settings so that they are like a base graphic with no figure region when printed to png file?

2008-12-12 Thread Mark Heckmann
Dear R-experts, I want to produce a very small png file (35 x 18 px) that contains a histogram without a figure region or margins, only the pure heights. In the base graphic this was easy: png(filename = "hist.png", res = 72, width=35, height=18) par(mar=c(0,0,0,0), oma=c(0,0,0,0))

Re: [R] character count

2008-12-12 Thread Carlos Cuartas
Hi Ista, one way could be: ncharacters<-unlist(lapply(x,function(x)nchar(gsub(' ','',x ncharacters From: Ista Zahn To: r-help@r-project.org Sent: Friday, December 12, 2008 10:31:10 AM Subject: [R] character count Dear list, I have a variable that consists

[R] Help with a permutation test

2008-12-12 Thread Grant Gillis
Hello List and thanks in advance for all of your help, I am trying implement a permutation test of a multinomial logistic regression ('multinom' within the nnet package). In the end I want to compare the parameter estimate from my data to the distribution of randomized parameter estimates. I ha

[R] Avoiding multiple outputs using RODBC package

2008-12-12 Thread Brigid Mooney
I am using R as a data manipulation tool for a SQL database. So in some of my R scripts I use the RODBC package to retreive data, then run analysis, and use the sqlSave function in the RODBC package to store the results in a database. There are two problems I want to avoid, and they are highly re

Re: [R] mixed model nested ANOVA

2008-12-12 Thread Andrew Robinson
Hi Sebpe, the analysis of the data that you describe could be a complex and lengthy process, in which decisions that you are confronted by are affected by previous decisions that you have made. I recommend obtaining the assistance of a statistician, preferably a local one whose door you can knock

Re: [R] The end of Matlab

2008-12-12 Thread Vitalie Spinu
On Fri, 12 Dec 2008 18:27:02 +0100, hadley wickham wrote: or may be just mtcars[cyl>3&last(20)] or this is already too far? This would be a considerable extension because then the selector would need to know about all other variables in the dataset, and you'd need someway of combining selec

[R] ANNOUNCE: 2009 John M. Chambers Statistical Software Award

2008-12-12 Thread J.R. Lockwood
John M. Chambers Statistical Software Award - 2009 Statistical Computing Section American Statistical Association The Statistical Computing Section of the American Statistical Association announces the competition for the John M. Chambers Statistical Software Award. In 1998 the Association for Co

Re: [R] assign()ing within apply

2008-12-12 Thread Thompson, David (MNR)
Thanks Jorge, I am aware of the method you suggest, however, it's not quite what I was asking for. I was attempting to do this change on 56 dataframes, so I attempted to do so with a list of all rather than each individually. Thanks, DaveT. From: Jorg

Re: [R] loop with dates

2008-12-12 Thread Jagat.K.Sheth
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Fernando Bizuet > Sent: Friday, December 12, 2008 12:55 PM > To: r-help@r-project.org > Subject: [R] loop with dates > > Hello, > > I am trying to do a loop with dates, but w

Re: [R] Make installed packages available to new R version

2008-12-12 Thread Prof Brian Ripley
You have not told us your OS (despite the posting guide). For Windows this is covered in the rw-FAQ. Similar advice would apply on a Unix-alike. For Mac OS X, see the recent archives of the R-sig-mac list. E.g. the strangely titled threads (look in a threaded view) around https://stat.ethz

[R] prevalence ratio and confidence intervals

2008-12-12 Thread Roberta Pereira Niquini
Hi everybody, I would like to estimate prevalence ratio and confidence intervals. I tried to do a log-binomial regression, but there was a failure of convergence. Now, I would like to learn how to do a poisson regression with robust variance. I am trying to estimate coefficients with poisson r

Re: [R] Odp: character count

2008-12-12 Thread Petr PIKAL
Ok, I knew somebody come with regex solution. My regex skills are limited so I do not use it very often. Regards Petr r-help-boun...@r-project.org napsal dne 12.12.2008 17:03:38: > On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote: > > Hi > > > > > > r-help-boun...@r-project.org napsal dne 1

Re: [R] loop with dates

2008-12-12 Thread Gabor Grothendieck
Try iterating over the index rather than the value of each component: s <- seq(fini,to = ffin, by='days') for (i in seq_along(s)) print(s[[i]]) On Fri, Dec 12, 2008 at 1:55 PM, Fernando Bizuet wrote: > Hello, > > I am trying to do a loop with dates, but when I try to use the index is not > a da

Re: [R] loop with dates

2008-12-12 Thread Henrique Dallazuanna
Try this: weekdays(seq(fini,to = ffin, by='days')) or in a loop: sapply(as.character(seq(fini,to = ffin, by='days')), function(d)weekdays(as.Date(d))) On Fri, Dec 12, 2008 at 4:55 PM, Fernando Bizuet wrote: > Hello, > > I am trying to do a loop with dates, but when I try to use the inde

Re: [R] The end of Matlab

2008-12-12 Thread hadley wickham
> My end would be the output of your end(). If there are no args and no local > context, I don't see the need for it to be a function call. It would just > be defined as something like > > end <- structure( function(n) c(rep(FALSE, n-1), TRUE), class="selector") Oh, I see what you mean. > I'm n

[R] loop with dates

2008-12-12 Thread Fernando Bizuet
Hello, I am trying to do a loop with dates, but when I try to use the index is not a date. Fcorte <- as.Date('2008/11/30',format = "%Y/%m/%d") fini <- Fcorte + 1 ffin <- seq(fini,by='months',length=2)[2] - 1 for (i in seq(fini,to = ffin, by='days')) print (weekdays(i)) # i does

Re: [R] The end of Matlab

2008-12-12 Thread Greg Snow
That depends on what you want evens() & last(5) to mean. Does that mean the last 5 evens (returning 5 values) or the values in the last 5 that are also even items (returning either 2 or 3 values depending on if the structure has an odd or even number of elements). It could be interpreted eithe

Re: [R] Make installed packages available to new R version

2008-12-12 Thread Mike Prager
Roy Robertson wrote: > After installing a new version of R, how do I make the packages that I > have already installed and use on the old version available to the new > version? Here is my solution. It has worked over many releases of R, though it will probably require one initial re-installat

Re: [R] The end of Matlab

2008-12-12 Thread Claudia Beleites
> evens() & last(5) wouldn't x[evens()][last(5)] do the & already? or is different, though. Claudia -- Claudia Beleites Dipartimento dei Materiali e delle Risorse Naturali Università degli Studi di Trieste Via Alfonso Valerio 6/a I-34127 Trieste phone: +39 (0 40) 5 58-34 47 email: cbelei...@un

Re: [R] The end of Matlab

2008-12-12 Thread Duncan Murdoch
On 12/12/2008 1:06 PM, hadley wickham wrote: Oh yes, that's a good point. But wouldn't the following do the job? "&.selector" <- function(a, b) { function(n) a(n) & b(n) } or "&.selector" <- function(a, b) { function(n) intersect(a(n), b(n)) } depending on whether selectors return logical

Re: [R] candisc plotting

2008-12-12 Thread Pete Shepard
Dear Michael, You haven't told us what your data is, and we can only surmise -- not very helpful for you and annoying for those who try to help. Apologies, I am brand new to R and this mailing list. Will try to be more concise. Here is my data a NEW verion of my data: Curvature Diameter Qu

Re: [R] Make installed packages available to new R version

2008-12-12 Thread Vitalie Spinu
Have a look at this http://thread.gmane.org/gmane.comp.lang.r.general/87014/focus=133050 it is safer to have all you packages reinstalled once you have updated R. HTH. On Fri, 12 Dec 2008 18:47:33 +0100, Roy Robertson wrote: After installing a new version of R, how do I make the packages th

Re: [R] The end of Matlab

2008-12-12 Thread hadley wickham
>> Oh yes, that's a good point. But wouldn't the following do the job? >> >> "&.selector" <- function(a, b) { >> function(n) a(n) & b(n) >> } >> >> or >> >> "&.selector" <- function(a, b) { >> function(n) intersect(a(n), b(n)) >> } >> >> depending on whether selectors return logical or numeric v

[R] Make installed packages available to new R version

2008-12-12 Thread Roy Robertson
After installing a new version of R, how do I make the packages that I have already installed and use on the old version available to the new version? Thank you, Roy Robertson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] The end of Matlab

2008-12-12 Thread Duncan Murdoch
On 12/12/2008 12:23 PM, hadley wickham wrote: On Fri, Dec 12, 2008 at 11:18 AM, Duncan Murdoch wrote: On 12/12/2008 11:38 AM, hadley wickham wrote: On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch wrote: On 12/12/2008 8:25 AM, hadley wickham wrote: From which you might conclude that I don

Re: [R] The end of Matlab

2008-12-12 Thread Gabor Grothendieck
On Fri, Dec 12, 2008 at 12:11 PM, Vitalie Spinu wrote: > On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham > wrote: > >> You could also imagine similar iterators for random sampling, like >> samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80% >> with replacement. first(n) could a

Re: [R] spatial AR and ARIMA

2008-12-12 Thread Roger Bivand
Erin Hodgess gmail.com> writes: > > Dear R People: > > Are there functions for spatial AR and ARIMA models in R, please? Would looking at the "Spatial" task view on your CRAN mirror help? If by AR you mean simultaneous or conditional autoregressive models using spatial weights (or moving ave

Re: [R] The end of Matlab

2008-12-12 Thread hadley wickham
On Fri, Dec 12, 2008 at 11:11 AM, Vitalie Spinu wrote: > On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham > wrote: > >> You could also imagine similar iterators for random sampling, like >> samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80% >> with replacement. first(n) could a

Re: [R] The end of Matlab

2008-12-12 Thread hadley wickham
On Fri, Dec 12, 2008 at 11:18 AM, Duncan Murdoch wrote: > On 12/12/2008 11:38 AM, hadley wickham wrote: >> >> On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch >> wrote: >>> >>> On 12/12/2008 8:25 AM, hadley wickham wrote: > > From which you might conclude that I don't like the design of su

Re: [R] The end of Matlab

2008-12-12 Thread Duncan Murdoch
On 12/12/2008 11:38 AM, hadley wickham wrote: On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch wrote: On 12/12/2008 8:25 AM, hadley wickham wrote: From which you might conclude that I don't like the design of subset, and you'd be right. However, I don't think this is a counterexample to my ge

[R] How to mimic select.list using RGtk2/gWidgetsRGtk2?

2008-12-12 Thread ronggui
I want to write a function mimic the function of select.list(), here is my preliminary version. select <- function(x,multiple=TRUE,...){ ans<-new.env() g <- gwindow(title=title,wid=200,heigh=500) x1<-ggroup(FALSE,con=g) x2<-gtable(x,multiple=multiple,con=x1,expand=TRUE) gbutton("OK",con=x1,handler

[R] T-mode PCA

2008-12-12 Thread Victor Homar
Hi, We are trying to classify atmospheric patterns using PCA and kmeans. In T-mode, the (non-normalized) loadings of the PCs are used as input variables for the k-means classification. As first step we perform PCA using "princomp" but the computed loadings produced by princomp are normalized

Re: [R] The end of Matlab

2008-12-12 Thread Vitalie Spinu
On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham wrote: You could also imagine similar iterators for random sampling, like samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80% with replacement. first(n) could also be useful, selecting the first min(n, length(vector)) observatio

Re: [R] converting multiple columns from POSIX* to Date

2008-12-12 Thread Farrel Buchinsky
I got the whole thing to work, with Hadley Wickham's help. is.POSIXt <- function(x) inherits(x, "POSIXt") dates <- sapply(df, is.POSIXt) df[dates] <-lapply(df[dates], as.Date) Farrel Buchinsky On Fri, Dec 12, 2008 at 11:26, Farrel Buchinsky wrote: > > Something strange. The lapply only proce

Re: [R] The end of Matlab

2008-12-12 Thread hadley wickham
On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch wrote: > On 12/12/2008 8:25 AM, hadley wickham wrote: >>> >>> From which you might conclude that I don't like the design of subset, and >>> you'd be right. However, I don't think this is a counterexample to my >>> general rule. In the subset functi

Re: [R] The end of Matlab

2008-12-12 Thread Greg Snow
Just to muddy the waters a bit further. Currently we can do things like: > pascal.tri <- numeric(0) > class(pascal.tri) <- 'pasctri' > > `[.pasctri` <- function(x, ...) { + dots <- list(...) + n <- dots[[1]] + row <- choose(n, 0:n) + if(length(dots) > 1) { + row <- row[ dots[[2]] ] + } + row + }

Re: [R] converting multiple columns from POSIX* to Date

2008-12-12 Thread Farrel Buchinsky
Something strange. The lapply only processed the first row and then wrote that value to every row of the original dataframe. It is as if the lapply is indeed processing every item on the list, namely each column, but the ifelse or the as.Date is getting messed up. Not only is it only processing the

Re: [R] character count

2008-12-12 Thread Gabor Grothendieck
On Fri, Dec 12, 2008 at 11:05 AM, Ista Zahn wrote: > Thanks to everyone who responded. This turns out to be amazingly easy. > To count characters including spaces: > nchar(x) > To count characters excluding spaces: > nchar(gsub(" *","",x)) The * is unnecessary. > > Thanks! > > On Fri, Dec 12, 20

[R] mixed model nested ANOVA

2008-12-12 Thread Sebpe De Smedt
Hi, I'm working on leaf characteristics of trees. Each tree is characterised by about 10 leaf traits. The trees were sampled at 9 different locations (about 20 to 30 trees/location, NOT balanced), grouped in 3 different climatic zones (Sahelian, Soudanian and Guinean) (NOT balanced). Further, eac

[R] Functions in R like lincom and nlcom of Stata

2008-12-12 Thread Marc Marí Dell'Olmo
Hello all, Does anyone know if there exists any function in R that resembles the "lincom" and "nlcom" of STATA?. These functions computes point estimates, standard errors, significance levels, confidence intervals, etc. for linear and non linear combinations of previous estimated parameters. Down

[R] What packages have impute method ?

2008-12-12 Thread Daren Tan
Besides the impute package, are there others that have alternative impute approaches ? I hope to compare their performances. Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] character count

2008-12-12 Thread Ista Zahn
Thanks to everyone who responded. This turns out to be amazingly easy. To count characters including spaces: nchar(x) To count characters excluding spaces: nchar(gsub(" *","",x)) Thanks! On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote: > Hi > > > r-help-boun...@r-project.org napsal dne 12.12.

Re: [R] Odp: character count

2008-12-12 Thread Henrique Dallazuanna
Or : nchar(gsub("[[:space:]]", "", x)) On Fri, Dec 12, 2008 at 2:00 PM, Petr PIKAL wrote: > Hi > > > r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10: > > > Dear list, > > I have a variable that consists of typed responses. I wish to compute > > a variable equal to the number of cha

Re: [R] Odp: character count

2008-12-12 Thread Gabor Grothendieck
On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote: > Hi > > > r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10: > >> Dear list, >> I have a variable that consists of typed responses. I wish to compute >> a variable equal to the number of characters in the original variable. >> For exam

[R] Odp: character count

2008-12-12 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10: > Dear list, > I have a variable that consists of typed responses. I wish to compute > a variable equal to the number of characters in the original variable. > For example: > > > x <- c("convert this to 32 because it has 32 charact

Re: [R] The end of Matlab

2008-12-12 Thread Wacek Kusnierczyk
Claudia Beleites wrote: >>> Wacek: >>> x[3:] instead of x[3:length(x)] x[3:end] >>> I don't think that would help: >>> what to use for end - 3 within the convention that negative values mean >>> exclusion? >>> >> might seem tricky, but not impossible:

Re: [R] character count

2008-12-12 Thread Claudia Beleites
nchar (c("convert this to 47 because it has 47 characters", "this one has 26 characters", "13 characters")) HTH Claudia -- Claudia Beleites Dipartimento dei Materiali e delle Risorse Naturali Università degli Studi di Trieste Via Alfonso Valerio 6/a I-34127 Trieste phone: +39 (0 40) 5 58-34 47

Re: [R] ref card for data manipulation?

2008-12-12 Thread Vitalie Spinu
On Fri, 12 Dec 2008 12:43:17 +0100, Liviu Andronic wrote: I'm not sure whether this can (partially) fill the gap, but Quick-R [1] has a decent overview of data manipulation, and is essentially a reference card. The maintainer of the Web site is open to improvements, so it might make sense to

Re: [R] The end of Matlab

2008-12-12 Thread Claudia Beleites
I just realized that my idea of doing something without going into the extraction functions itself won't work :-( it was a nice dream, though. The reason is that there is no general way to find out what the needed length is: At least I'm just writing a class where 2 kinds of columns are involve

[R] character count

2008-12-12 Thread Ista Zahn
Dear list, I have a variable that consists of typed responses. I wish to compute a variable equal to the number of characters in the original variable. For example: > x <- c("convert this to 32 because it has 32 characters", "this one has 22 > characters", "12 characters") [Some magic function h

Re: [R] The end of Matlab

2008-12-12 Thread Gabor Grothendieck
Here is how to emulate matlab end in R in the case of matrices. Rather than redefine the matrix class (which would be a bit intrusive) we just define a subclass of matrix called matrix2. Note in the examples that matrix2 survives some operations such as + but not others such as crossprod so in th

Re: [R] Eror handling with R

2008-12-12 Thread Sarah Goslee
Is try() what you're looking for? Sarah On Fri, Dec 12, 2008 at 5:43 AM, wrote: > Is there any way to handle errors retuened by R functions ... something like > the exception handling in C++ ? > > Thank you so much, > Maura > > Alice Messenger ;-) chatti anche con gli amici di Windows Live Mes

Re: [R] The end of Matlab

2008-12-12 Thread Claudia Beleites
> > Wacek: > >> x[3:] > >> instead of > >> x[3:length(x)] > >> x[3:end] > > > > I don't think that would help: > > what to use for end - 3 within the convention that negative values mean > > exclusion? > > might seem tricky, but not impossible: > > x[-2] > # could mean 'all except for 2nd', as it i

[R] DSC 2009: Now open for registration and abstract submission

2008-12-12 Thread Peter Dalgaard
Re. Workshop on Directions in Statistical Computing, Copenhagen 13-14 July 2009. http://www.r-project.org/dsc-2009 The web interface for registration and submission of abstracts is now open. (The site is still under construction in a number of respects. In particular, we haven't negotiated disco

Re: [R] Extracting the name of an object into a character string and vice versa

2008-12-12 Thread Simon Pickett
paste() ?paste - Original Message - From: "Philip Whittall" To: Sent: Friday, December 12, 2008 1:30 PM Subject: Re: [R] Extracting the name of an object into a character string and vice versa I am still struggling to map a character string to an object name and vice versa in R

Re: [R] setting the R_Libs gives warning message from Rgui.exe

2008-12-12 Thread Daren Tan
I have managed to get rid the two warning messages simply by uninstalling and installing again R. Very likely that I disrupted the installation of a large package. > Date: Fri, 12 Dec 2008 15:07:38 +0100 > From: lig...@statistik.tu-dortmund.de > To: dare...@hotmail.com > CC: r-h...@stat.math.e

Re: [R] How to generate a prediction equation for a stratified survival model that was fitted by cph() in Design package

2008-12-12 Thread Yu, Changhong
Dear Dr. Harrell, Thanks for response so quickly. Here is example code to illustrate the problem. > n <- 1000 > set.seed(731) > age <- 50 + 12*rnorm(n) > label(age) <- "Age" > sex <- factor(sample(c('Male','Female'), n, + rep=TRUE, prob=c(.6, .4))) > cens <- 15*runif(n) > h <- .02*e

[R] Support vector model?

2008-12-12 Thread Celine Carret
Dear All, Apologies for sending this email to both list, but at this point I'm not sure which one could help me the most. I have 4 sets of data, 1 test and 3 different sets of controls. The measurements are binary, with a matrix of 0 and 1 I'm measuring across time (rows, ~815) the behaviour of

[R] Eror handling with R

2008-12-12 Thread mauede
Is there any way to handle errors retuened by R functions ... something like the exception handling in C++ ? Thank you so much, Maura Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e tutti i telefonini TIM! Vai su http://maileservizi.alice.it/alice_messenger/index.htm

[R] preprocessCore

2008-12-12 Thread irene . vicari
Bonjour! Je suis en train de faire un projet utilisant Affymatrix mais j'ai un problème à télécharger un package depuis R: une fois que je télécharge le package et je demande de faire "rma" ca sort l'erreur suivante et je n'ai aucune idée de comment je pourrais faire. > library(preprocessCore) >

Re: [R] Row order in plot

2008-12-12 Thread qroberts
Thanks very much for the replies. Both suggestions worked perfectly. That's one more step towards understanding R. Thanks again. -- View this message in context: http://www.nabble.com/Row-order-in-plot-tp20962774p20974800.html Sent from the R help mailing list archive at Nabble.com. __

[R] How-To capture and handle errors with R

2008-12-12 Thread mauede
The following error occurs every now and then by calling a function of wmTSA package: Error in `row.names<-.data.frame`(`*tmp*`, value = c("1", "0")) : invalid 'row.names' length I would greatly appreciate some guidelines about how to catch such an error upon its occurrence and have it handl

Re: [R] Please help me in Converting this from C# to R [C1]

2008-12-12 Thread Taoufik NADIFI
Please, can you tell me if you know how can i use the library Igraph in C# ? Thanks Nadifi Taoufik * This message and any attachments (the "message") are con...{{dropped:15}} __ R-

Re: [R] The end of Matlab

2008-12-12 Thread Wacek Kusnierczyk
>> Wacek: >> >> >>> x[3:] >>> instead of >>> x[3:length(x)] >>> x[3:end] >>> >>> >> I don't think that would help: >> what to use for end - 3 within the convention that negative values mean >> exclusion? >> >> >> >> > > might seem tricky, but not impossible: > > x[-2]

Re: [R] assign()ing within apply

2008-12-12 Thread Thompson, David (MNR)
Any tips? DaveT. >-Original Message- >From: Thompson, David (MNR) >Sent: December 9, 2008 04:03 PM >To: 'r-help@r-project.org' >Subject: assign()ing within apply > >Hello, > >I'm trying to convert a character column in several dataframes >to lower case. > >### ># ># Sample data and 'spp

Re: [R] The end of Matlab

2008-12-12 Thread Duncan Murdoch
On 12/12/2008 8:25 AM, hadley wickham wrote: From which you might conclude that I don't like the design of subset, and you'd be right. However, I don't think this is a counterexample to my general rule. In the subset function, the select argument is treated as an unevaluated expression, and the

Re: [R] Error message when starting TINN-R

2008-12-12 Thread Richardson, Patrick
I have asked the maintainer for a fix and didn't get a reply, which is why I posted to the list to see if there were any other ideas. Sorry to bother. . . with my warning message. Patrick -Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Friday, December 1

Re: [R] The end of Matlab

2008-12-12 Thread Wacek Kusnierczyk
Claudia Beleites wrote: > Am Freitag 12 Dezember 2008 13:10:20 schrieb Patrick Burns: > >> How about: >> >> x[, -seq(to=ncol(x), length=n)] >> > Doing it is not my problem. I just agree with Mike in that I would like if I > could do shorter than: > > x[, 1 : (ncol(x) - n)] > > which I bt

Re: [R] Error message when starting TINN-R

2008-12-12 Thread Prof Brian Ripley
And the *Error* message was (that was a warning)? The warning comes from some contributed code, probably in Tinn-R. Please find out where it is and ask the maintainer for a fix. But it looks harmless enough. On Fri, 12 Dec 2008, Richardson, Patrick wrote: When R starts I get the following

[R] Error message when starting TINN-R

2008-12-12 Thread Richardson, Patrick
When R starts I get the following error message Warning message: In grep(paste("[{]TclEval ", topic, "[}]", sep = ""), tclvalue(.Tcl("dde services TclEval {}")), : argument 'useBytes = TRUE' will be ignored Has anyone else run into this issue and is there any way to can fix this? Thanks, Patri

[R] Fwd: Re: The end of Matlab (sorry, I messed up a sentence)

2008-12-12 Thread Claudia Beleites
-- Weitergeleitete Nachricht -- Betreff: Re: [R] The end of Matlab Datum: Freitag 12 Dezember 2008 Von: Claudia Beleites An: r-help@r-project.org Am Freitag 12 Dezember 2008 13:10:20 schrieb Patrick Burns: > How about: > > x[, -seq(to=ncol(x), length=n)] Doing it is not my prob

  1   2   >