[R] mclustBIC version 3.3.1

2009-09-11 Thread madmax1425
Hi there, I started getting a new error with the latest mclust package version 3.3.1. My only solution was to install the older package 3.2.1 or even 3.1-10. , (i think older ones will still work since i ve been using it for a while) the sentence giving trouble is: BIC <- mclustBIC(as.vector

Re: [R] bar chart with means - using ggplot

2009-09-11 Thread Dianne Cook
I would recommend not representing means by bars at all. Bars are for counts, stacking from zero. Means are point estimates. ggplot has a lot of routines for displaying means with errors bars: geom_linerange, geom_pointrange. To hone your ggplot skills I recommend looking into these geoms.

Re: [R] Accumulating results from "for" loop in a list/array

2009-09-11 Thread Johannes Hüsing
Steven Kang schrieb: Dear R users, I would like to accumulate objects generated from 'for' loop to a list or array. To illustrate the problem, arbitrary data set and script is shown below, x <- data.frame(a = c(rep("n",3),rep("y",2),rep("n",3),rep("y",2)), b = c(rep("y",2),rep("n",4),rep("y"

Re: [R] generating multiple sequences in subsets of data

2009-09-11 Thread David Winsemius
Have you tried running merged_cut_col$pickts through something that is less complex? Perhaps: table(merged_cut_col$pickts) ... to see if there are problems with the "inner" functions? Also I think the as.numeric might be superfluous, since Dates are really just integers with some attitude,

Re: [R] Moving to Mac OS X

2009-09-11 Thread Victor Manuel Garcia Guerrero
Thanks to everybody for your comments. All the best. Víctor Manuel García Guerrero Doctorado en Estudios de Población, CEDUA, COLMEX Camino al Ajusco N° 20, Pedregal de Sta. Teresa C.P.10740, Tlalpan, México, D.F. * : vmgar...@colmex.mx * : 5617-9016 __

Re: [R] For sending my R package as part of R-project

2009-09-11 Thread Lio, Yuhlong
Thank you for your help. We will read the intructions. When it is ready, I or my co-authers will send our package to R-project.org. Yuhlong From: Turner Rolf [r.tur...@auckland.ac.nz] Sent: Friday, September 11, 2009 5:30 PM To: Liviu Andronic; Lio, Y

Re: [R] help in matching two column vectors

2009-09-11 Thread jim holtman
Is this what you want: > (a<-1:6) [1] 1 2 3 4 5 6 > (b<-c(5,2)) [1] 5 2 > (m1<-match(a,b)) [1] NA 2 NA NA 1 NA > cbind(a, b[m1]) a [1,] 1 NA [2,] 2 2 [3,] 3 NA [4,] 4 NA [5,] 5 5 [6,] 6 NA > Your 'missing function b' in the first example was due to you thinking 'b(m1[i])' is equivalent t

[R] Way to iteratively change line color and line style

2009-09-11 Thread Jason Rupert
I would like to have a way to automatically change the line color and line style. Below is an example of the items I am plotting. I've contemplated coming up with a list of desired colors and styles, but I am hoping there is an automated way for this to be accomplished as the number of lines

Re: [R] help with for loop

2009-09-11 Thread Steve Lianoglou
Hi, On Sep 11, 2009, at 6:35 PM, Edward Chen wrote: example code: P = function(whichday,columns){ y = which(pvalue[,whichday]0){ #diffbig = meandayxx0) x[i] = raw_urine[x_index[i],1] dayx[i]= raw_urine[x_index[i],day1_ind] dayy[i] = raw_urine[x_index[i],columns] jpeg("test 1.jpg",width=800, hei

[R] help with for loop

2009-09-11 Thread Edward Chen
example code: P = function(whichday,columns){ y = which(pvalue[,whichday]0){ #diffbig = meandayxx0) x[i] = raw_urine[x_index[i],1] dayx[i]= raw_urine[x_index[i],day1_ind] dayy[i] = raw_urine[x_index[i],columns] jpeg("test 1.jpg",width=800, height = 800) matplot(x[i],dayx[i],lwd = 3,pch=1,col = "bla

Re: [R] For sending my R package as part of R-project

2009-09-11 Thread Turner Rolf
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Liviu Andronic [landronim...@gmail.com] Sent: Saturday, September 12, 2009 8:42 AM To: Lio, Yuhlong Cc: r-help@r-project.org Subject: Re: [R] For sending my R package as part of

Re: [R] Best R text editors?

2009-09-11 Thread Ted Harding
On 11-Sep-09 21:02:06, Patrick Connolly wrote: > On Fri, 11-Sep-2009 at 03:46PM +0100, Ted Harding wrote: > > [] > >|> Well, not really!! My point (and certainly Charles Curran's point) >|> is that in touch-typing you know by proprioception and >|> neuromuscular coordination where your finger

Re: [R] goodness of "prediction" using a model (lm, glm, gam, brt, regression tree .... )

2009-09-11 Thread jamesmcc
I think it's important to say why you're unhappy with your current measures? Are they not capturing aspects of the data you understand? I typically use several residual measures in conjunction, each has it's benefits/drawbacks. I just throw them all in a table. -- View this message in contex

Re: [R] Best R text editors?

2009-09-11 Thread Nikos Alexandris
[Answering to the threads question] For those who use Gnome's gedit, there is now RGedit: http://sourceforge.net/projects/rgedit Apologies if this was already posted, Nikos __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] bar chart with means - using ggplot

2009-09-11 Thread Felipe Carrillo
Like this? # example using qplot library(ggplot2) meanprice <- tapply(diamonds$price, diamonds$cut, mean);meanprice cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut)) qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50")) dev.new() # create a new graph to compare wi

Re: [R] Using R for a slightly tricky survey analysis

2009-09-11 Thread Andreas Stefik
Hello folks, I have recently finished a pilot study of a survey and am working to complete the statistical analysis of the results in R. My Phd is technically in computer science (not statistics), although I teach basic stats and have a "decent" working knowledge of the area. With that said, my ex

[R] Using R for a slightly tricky survey analysis

2009-09-11 Thread Andreas Stefik
Hello folks, I have recently finished a pilot study of a survey and am working to complete the statistical analysis of the results in R. My Phd is technically in computer science (not statistics), although I teach basic stats and have a "decent" working knowledge of the area. With that said, my ex

Re: [R] Barplot+Table

2009-09-11 Thread Marc Schwartz
On Sep 11, 2009, at 1:20 PM, Andy Choens wrote: I am trying to automate a report that my company does every couple of years for the state of Maine. In the past we have used SPSS to run the data and then used complicated Excel template to make the tables/graphics which we then imported into

Re: [R] rpart - the xval argument in rpart.control and in xpred.rpart

2009-09-11 Thread jamesmcc
I have this *exact* same confusion. Adding to this is the fact that Everitt and Hothorn in their book, HSAUR, say that setting xval=100 gives "100 runs of 10-fold cross-validation" (1st ed., page 136). Is this actually 1 run of 100-fold cross-validation? For large xval, doing multiple cross-v

Re: [R] Working with large matrix

2009-09-11 Thread A Ezhil
HI Steve, Thanks a lot for your suggestions. I never used bigmemory and biglm before. Is there a way (using systems commands) to combine awk and R? I was thinking of calling a R program inside Awk, passing each row to R, do the lm, get back results and process it with awk. Will this make the ca

Re: [R] Alternative to Scale Function?

2009-09-11 Thread Noah Silverman
Genius, That certainly is much faster that what I had worked out on my own. I looked at sweep, but couldn't understand the rather thin help page. Your example makes it really clear Thank You!!! -- Noah On 9/11/09 1:57 PM, Gavin Simpson wrote: > On Fri, 2009-09-11 at 13:10 -0700, Noah Silver

Re: [R] Alternative to Scale Function?

2009-09-11 Thread Mark Difford
>> The scale function will return the mean and sd of the data. By default. Read ?scale. Mark. Noah Silverman-3 wrote: > > I think I just answered my own question. > > The scale function will return the mean and sd of the data. > > So the process is fairly simple. > scale training data varai

Re: [R] Best R text editors?

2009-09-11 Thread Patrick Connolly
On Fri, 11-Sep-2009 at 03:46PM +0100, Ted Harding wrote: [] |> Well, not really!! My point (and certainly Charles Curran's point) |> is that in touch-typing you know by proprioception and |> neuromuscular coordination where your fingers are relative to the |> keys on the keyboard, and what ke

[R] help in matching two column vectors

2009-09-11 Thread ravi
Dear list, I have a long list of two vectors with some matching elements. I would like to line them up in two columns and have an NA in those positions of the second vector where a match is absent. With a simple example, I will explain my problem. (a<-1:6) (b<-c(5,2)) (m1<-match(a,b)) (ab<-cbind

Re: [R] Alternative to Scale Function?

2009-09-11 Thread Gavin Simpson
On Fri, 2009-09-11 at 13:10 -0700, Noah Silverman wrote: > Hi, > > Is there an alternative to the scale function where I can specify my own > mean and standard deviation? A couple of calls to sweep? See ?sweep set.seed(123) dat <- data.frame(matrix(runif(10*10), ncol = 10)) xbar <- colMeans(da

[R] ANN: rproto v1 (Protocol Buffers and R) [repost]

2009-09-11 Thread Saptarshi Guha
Hello, (Previous message was scrubbed) I apologize if this is not the list for package announcements. Having said that I've released a package called rprotos which implements a simple serialization using Googles protocol buffers[1]. The package also includes some miscellaneous functions for writin

Re: [R] constrOptim parameters

2009-09-11 Thread Ravi Varadhan
Ivo, Do you only have "box" constraints, i.e. upper and lower bounds on the parameters themselves? If so, you do not need to use `constrOptim'. You could use "L-BFGS-B" in `optim' or `nlminb' or `spg'. You are mistaken about how `ui' is set up. It should be a matrix with dimension, Ni x p, whe

Re: [R] Alternative to Scale Function?

2009-09-11 Thread Noah Silverman
I think I just answered my own question. The scale function will return the mean and sd of the data. So the process is fairly simple. scale training data varaible note mean and sd from the scale then manually scale the test data using the mean and sd from the training data. That should make s

Re: [R] generating multiple sequences in subsets of data

2009-09-11 Thread Jason Baucom
A bit of debugging information > merged_cut_col$pickseq <- > ave(as.numeric(as.Date(merged_cut_col$pickts)),merged_cut_col$cpid,as.numeric(as.Date(merged_cut_col$pickts)) > > as.numeric(as.Date("2008-12-01")),FUN=seq) Error: cannot allocate vector of size 55 Kb > memory.size() [1] 1882.56 > obje

Re: [R] For sending my R package as part of R-project

2009-09-11 Thread Liviu Andronic
Hello On Fri, Sep 11, 2009 at 4:40 PM, Lio, Yuhlong wrote: > The reviewers and editor suggest the R package for the sampling plans of the > paper be part of R-project. Please let me know what I should do to make the R > package available for R-project group. > I would suggest that you check thi

Re: [R] generating multiple sequences in subsets of data

2009-09-11 Thread Jason Baucom
My apologies for bringing up an old topic, but still having some problems! I got this code to work, and it was running perfectly fine. I tried it with a larger data set and it crashed my machine, slowly chewing up memory until it could not allocate any more for the process. The following line ki

[R] ANN: rproto v1 (Protocol Buffers and R)

2009-09-11 Thread Saptarshi Guha
Hello, I apologize if this is not the list for package announcements. Having said that I've released a package called rprotos which implements a simple serialization using Googles protocol buffers[1]. The package also includes some miscellaneous functions for writing/ reading variable length e

Re: [R] How to do rotation for polygon?

2009-09-11 Thread Greg Snow
Does this do what you want? library(TeachingDemos) ms.pent <- function(ang=0,...) { theta <- seq(ang, length.out=6, by=2*pi/5) cbind( cumsum(cos(theta)/2), cumsum(sin(theta)/2) ) } par(xpd=NA) my.symbols( rep(1,5), rep(1,5), ms.pent, ang=seq(0, by=2*pi/5, length.ou

[R] constrOptim parameters

2009-09-11 Thread ivo welch
Dear R wizards: I am playing (and struggling) with the example in the constrOptim function. simple example. let's say I want to constrain my variables to be within -1 and 1.I believe I want a whole lot of constraints where ci is -1 and ui is either -1 or 1. That is, I have 2*N constraints.

[R] Alternative to Scale Function?

2009-09-11 Thread Noah Silverman
Hi, Is there an alternative to the scale function where I can specify my own mean and standard deviation? I've come across an interesting issue where this would help. I'm training and testing on completely different sets of data. The testing set is smaller than the training set. Using the

Re: [R] R on Multi Core

2009-09-11 Thread Romain Francois
On 09/11/2009 10:05 PM, Noah Silverman wrote: Hi, Our discussions about 64 bit R has led me to another thought. I have a nice dual core 3.0 chip inside my Linux Box (Running Fedora 11.) Is there a version of R that would take advantage of BOTH cores?? (Watching my system performance meter now

Re: [R] Barplot+Table

2009-09-11 Thread Andy Choens
On Friday 11 September 2009 02:47:32 pm Henrique Dallazuanna wrote: > Try the textplot function in the gplots package: Thank you. That definitely gives me a direction to pursue. It doesn't look like there is an easy way to make things line up though, which is unfortunate but I'm sure it's possib

[R] R on Multi Core

2009-09-11 Thread Noah Silverman
Hi, Our discussions about 64 bit R has led me to another thought. I have a nice dual core 3.0 chip inside my Linux Box (Running Fedora 11.) Is there a version of R that would take advantage of BOTH cores?? (Watching my system performance meter now is interesting, Running R will hold a single

Re: [R] Moving to Mac OS X

2009-09-11 Thread Noah Silverman
Thanks Steve, That's a big help. On 9/11/09 12:48 PM, Steve Lianoglou wrote: Hi, On Sep 11, 2009, at 3:40 PM, Noah Silverman wrote: Steve, You make a good point. I confused 64 bit with a multi-core setup. That said, I don't belive the pretty packaged up GUI has a 64 bit version, just t

[R] ipred bagging segfault on 64 bit linux build

2009-09-11 Thread jamesmcc
I wanted to report this issue here so others may not find themselves alone and as the author is apparently active on the list. I havent done an exhaustive test by any means, cause I dont have time. But here's a small example. Apparently the "ns" argument is the one that is killing it. I've gotten

Re: [R] Moving to Mac OS X

2009-09-11 Thread Steve Lianoglou
Hi, On Sep 11, 2009, at 3:40 PM, Noah Silverman wrote: Steve, You make a good point. I confused 64 bit with a multi-core setup. That said, I don't belive the pretty packaged up GUI has a 64 bit version, just the "raw terminal" version does. There is a 64bit version of the R.app GUI, you

Re: [R] Moving to Mac OS X

2009-09-11 Thread Noah Silverman
Steve, You make a good point. I confused 64 bit with a multi-core setup. That said, I don't belive the pretty packaged up GUI has a 64 bit version, just the "raw terminal" version does. On 9/11/09 12:38 PM, Steve Lianoglou wrote: Hi, On Sep 11, 2009, at 3:08 PM, Noah Silverman wrote: 3)

Re: [R] Moving to Mac OS X

2009-09-11 Thread Steve Lianoglou
Hi, On Sep 11, 2009, at 3:08 PM, Noah Silverman wrote: 3) I purposefully chose NOT to install 64bit R. I have a dual-core machine. With the 32 bit version, R will happily keep one core running at 100%, but then I have other core free for my "regular" work. Using 64bit R shouldn't change

Re: [R] how to determine if a variable is already set?

2009-09-11 Thread Duncan Murdoch
On 9/11/2009 1:15 PM, carol white wrote: Hi, It might be a primitive question but how it is possible to determine if a variable is initialized in an environment? Suppose that we start a R session and wants to run a script which use the variable i. Which function could evaluate if i is already

Re: [R] Matrix multiplication and random numbers

2009-09-11 Thread Henrique Dallazuanna
If I understand you can use replicate: replicate(10, matmult(InitialPop, 1)) On Fri, Sep 11, 2009 at 1:11 PM, RFish wrote: > > Hi > > Sorry I don't seem to have explained what I'm trying to do very clearly. > The piece of code below multiplies the two matrices together a number of > times base

Re: [R] Moving to Mac OS X

2009-09-11 Thread Noah Silverman
Hi, I'm a daily user of both mac and Linux so wanted to offer some thoughts: 1) R runs great on a Mac. There is a standard install from the cran website that has a nice GUI built into it. You can do things like drag files to the console and it will fill in the path name. 2) I like using B

Re: [R] How to Label Certain Lags for a PACF Graph

2009-09-11 Thread Henrique Dallazuanna
Try this: pacf(data$R1, main = "Series R1 Residuals", xaxt = 'n') axis(1, c(1, axTicks(1))) On Fri, Sep 11, 2009 at 1:02 PM, Stephanie Cooke wrote: > When I use the command for PACF, lags 5, 10, 15, and 20 are labeled. I > would > like to label lag 1. I would greatly appreciate if someone could

Re: [R] How to Label Certain Lags for a PACF Graph

2009-09-11 Thread Jorge Ivan Velez
Hi Stephanie, Take a look at the "xaxt" argument under ?par as well as ?axis. Here is an example modified from ?pacf : acf(lh, xaxt = "n") axis(1, 0:16, 0:16, cex.axis = 0.8) HTH, Jorge On Fri, Sep 11, 2009 at 12:02 PM, Stephanie Cooke wrote: > When I use the command for PACF, lags 5, 10,

[R] NLME

2009-09-11 Thread Jeff in NC
I am trying to use one of the variance function classes (e.g., varClasses -varConstPower or varPower) When I run the model under default conditions or specify varIdent explicitly I do not have any problems. If I try to use anything else I get error messages of the form "Error in na.fail.defaul

Re: [R] Matrix multiplication and random numbers

2009-09-11 Thread RFish
Hi Sorry I don't seem to have explained what I'm trying to do very clearly. The piece of code below multiplies the two matrices together a number of times based on the value in the matmult(InitialPop,1) term in this case one (year), this gives me the end population for the analysis. InitialPop<

[R] How to Label Certain Lags for a PACF Graph

2009-09-11 Thread Stephanie Cooke
When I use the command for PACF, lags 5, 10, 15, and 20 are labeled. I would like to label lag 1. I would greatly appreciate if someone could tell me how to do this. Below is the command that I am using: pacf(data$R1,main="Series R1 Residuals") [[alternative HTML version deleted]] __

[R] R help:

2009-09-11 Thread Matthew Fantle
Hi I have written a code to do some averaging of data over uneven intervals. The for loop keeps missing particular depths and I once got an error message reading: *** caught segfault *** address 0xc023, cause 'memory not mapped' Possible actions: 1: abort (with core dump, if enabled) 2

Re: [R] Barplot+Table

2009-09-11 Thread Henrique Dallazuanna
Try the textplot function in the gplots package: nf <- layout(matrix(1:2), height = lcm(12)) par(mar = c(2, 8, 2, 2)) barplot(prop.table(example.table, 1), beside = TRUE) textplot(round(prop.table(example.table, 1), 2), halign = 'left', mar = c(0,0,0,0), show.colnames = FALSE, cex = 2,

[R] How to block data across multiple columns?

2009-09-11 Thread A Singh
Dear all, Does anyone have any suggestions on how to block multiple columns of data one at a time in the midst of an analysis, having specified the blocking variable? I am running a random effects model using lmer, and my data set has multiple columns. Individuals in the study are grouped i

Re: [R] help with plotting

2009-09-11 Thread Steve Lianoglou
Hi Edward, On Sep 11, 2009, at 1:47 PM, Edward Chen wrote: HI all, raw_urine = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\mz.spot.sam.dat.new ", header = TRUE ) pvalue = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\all.urine.features.t.test.result ", he

Re: [R] Working with large matrix

2009-09-11 Thread Steve Lianoglou
Hi, On Sep 11, 2009, at 1:15 PM, A Ezhil wrote: Dear All, I have large matrix (46000 x 11250). I would like to do the linear regression for each row. I wrote a simple function that has lm() and used apply(mat,1,func). The issue is that it takes ages to load the file and also to finish th

[R] Barplot+Table

2009-09-11 Thread Andy Choens
I am trying to automate a report that my company does every couple of years for the state of Maine. In the past we have used SPSS to run the data and then used complicated Excel template to make the tables/graphics which we then imported into Word. Since there are 256 tables/graphics for this re

[R] help with plotting

2009-09-11 Thread Edward Chen
HI all, raw_urine = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\mz.spot.sam.dat.new", header = TRUE ) pvalue = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\all.urine.features.t.test.result", header = TRUE ) library(compositions) p = function(a,b){ y = pvalue[,a]

Re: [R] Moving to Mac OS X

2009-09-11 Thread Steve Lianoglou
Hi, On Sep 11, 2009, at 1:15 PM, Victor Manuel Garcia Guerrero wrote: Hi all, I have been using R on Windows for a long time, but now I am ready to move to Mac OS X, but I was just wondering if R works better on Mac than on Windows. This is because I had some memory size issues in the pa

Re: [R] Moving to Mac OS X

2009-09-11 Thread Marc Schwartz
On Sep 11, 2009, at 12:15 PM, Victor Manuel Garcia Guerrero wrote: Hi all, I have been using R on Windows for a long time, but now I am ready to move to Mac OS X, but I was just wondering if R works better on Mac than on Windows. This is because I had some memory size issues in the past.

[R] R/S Programmer Employment Opportunity - New York, NY

2009-09-11 Thread Wesley Madison
R / S Programmer - New York Description: Kaplan Test Prep & Admissions is looking for a R / S Programmer to join their research based in New York City. We are looking for highly motivated individuals to work in a customer-focused environment. This is a unique opportunity to develop with a leading

Re: [R] AIC and goodness of prediction - was: Re: goodness of "prediction" using a model (lm, glm, gam, brt,

2009-09-11 Thread Kingsford Jones
Hi Corrado, Not being familiar with your research goals or data I can't make recommendations, but I can suggest a couple of places to look for information: Frank Harrell's Regression Modeling Strategies and his Design library available on CRAN, and Hastie et al's The Elements of Statistical Learn

Re: [R] transposing a distance matrix in R

2009-09-11 Thread Henrique Dallazuanna
Try this also: subset(as.data.frame.table(m), !is.na(Freq)) On Fri, Sep 11, 2009 at 1:48 PM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: > Hi Jeannine, > > I'm just forwarding this Q&A back to the r-help list, you'll get more eyes > on it and other people might have better solutions

[R] how to determine if a variable has already been initialized?

2009-09-11 Thread carol white
Hi, It might be a primitive question but how it is possible to determine if a variable is initialized in an environment? Suppose that we start a R session and wants to run a script which uses the variable i. Which function could evaluate if i exists already and has been initialized or not? The p

Re: [R] how to determine if a variable is already set?

2009-09-11 Thread Marc Schwartz
On Sep 11, 2009, at 12:15 PM, carol white wrote: Hi, It might be a primitive question but how it is possible to determine if a variable is initialized in an environment? Suppose that we start a R session and wants to run a script which use the variable i. Which function could evaluate if i

[R] Working with large matrix

2009-09-11 Thread A Ezhil
Dear All, I have large matrix (46000 x 11250). I would like to do the linear regression for each row. I wrote a simple function that has lm() and used apply(mat,1,func). The issue is that it takes ages to load the file and also to finish the lm. I am using LINUX 64 bit with 32G mem. Is there an

[R] Moving to Mac OS X

2009-09-11 Thread Victor Manuel Garcia Guerrero
Hi all, I have been using R on Windows for a long time, but now I am ready to move to Mac OS X, but I was just wondering if R works better on Mac than on Windows. This is because I had some memory size issues in the past. Another question is if some of you know an R editor for Mac (just like

[R] how to determine if a variable is already set?

2009-09-11 Thread carol white
Hi, It might be a primitive question but how it is possible to determine if a variable is initialized in an environment? Suppose that we start a R session and wants to run a script which use the variable i. Which function could evaluate if i is already initialized or not and if not, then ask int

Re: [R] Completion for proto objects

2009-09-11 Thread Gabor Grothendieck
You might check the bugs section on the proto home page and if any of those seem to apply try the devel version of proto (or the workaround mentioned) as all known bugs are fixed in the devel version. If that does not help let me know offline and I will try to help you. See: http://r-proto.google

Re: [R] transposing a distance matrix in R

2009-09-11 Thread Steve Lianoglou
Hi Jeannine, I'm just forwarding this Q&A back to the r-help list, you'll get more eyes on it and other people might have better solutions. Answers inline: On Sep 11, 2009, at 12:25 PM, Jeannine Cavender-Bares wrote: Dear Steve, Greetings! You helped me earlier this summer with an R quest

Re: [R] Completion for proto objects

2009-09-11 Thread Vitalie S.
On Fri, 11 Sep 2009 16:07:45 +0200, Gabor Grothendieck wrote: See ?assignInNamespace thanks for the hint. It works to some extent. Functions are redefined in "base" but utils:::specialCompletions seems not to preform properly: ls.proto <- function(x){ # function to complete .local

[R] Simple time series questions

2009-09-11 Thread gug
I'm sure this is a really simple problem, but I've spent hours digging and I keep running into roadblocks. I'm trying to get a simple chart with three time series. Similar to the attached example http://www.nabble.com/file/p25398419/Excel%2Bchart%2Bexample.pdf Excel+chart+example.pdf , somethin

Re: [R] Is there any "month" object like "LETTERS" ?

2009-09-11 Thread Steve Murray
month.abb should do the trick _ View your other email accounts from your Hotmail inbox. Add them now. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] State Space models in R

2009-09-11 Thread Gabor Grothendieck
You might try: RSiteSearch("state space") and try the search engine at rseek.org On Fri, Sep 11, 2009 at 11:04 AM, Giovanni Petris wrote: > > Hello everybody, > > I am writing a review paper about State Space models in R, and I would > like to cover as many packages as I reasonably can. > > So

[R] Slow enumeration of vectors with restrictions

2009-09-11 Thread Bryan Keller
I have a vector T and a scalar m such that 1 <= m <= sum(T). I also have a vector U that satisfies three properties... 1. length(T)==length(U) 2. sum(U)==m 3. for (i in 1:length(T)) U[i]<=T[i] The function "nextu" (given below) calculates the "next" vector subject to the same restrictions.

Re: [R] Graph visualization

2009-09-11 Thread Martin Morgan
Arber Ngjela wrote: > Hello, > I am working with graph and adjacency matrix, the package 'graph' seems to be > appropriate for this. > An example in the package >> mat <- rbind(c(0, 0, 1, 1), > + c(0, 0, 1, 1), > + c(1, 1, 0, 1), > + c(1, 1, 1, 0)) >> rowna

Re: [R] : How wo read stability VAR plot?

2009-09-11 Thread Pfaff, Bernhard Dr.
> > >I have made program code for Vector Auto Regressive in terms >of completing my undergraduate program using R. I have an important >question related to my project. >If I have: >data(Canada) >var.2c <- VAR(Canada, p = 2, type = "const") >var.2c.stabil <- stability(var.2c,

[R] Rmetrics timeDate - business days between dates

2009-09-11 Thread Leonardo Miceli
Hi One of the most important calculation in applied finance is the number of days between dates. That kind of calculus become annoying when a specific calendar must be used. That is the case for the business days calculus. The package timeDate has a function isBizday to perform that kind of thing

Re: [R] State Space models in R

2009-09-11 Thread spencerg
Hi, Giovanni: 1. I've used primarily "sspir" and "dlm". There is apparently a new release of "sspir", which I have not used. When I last tried "sspir", it did NOT have a forecast function, while "dlm" did. The two packages have functions with the same name but incompatible code. It

Re: [R] Simple time series questions

2009-09-11 Thread gug
Thanks - that works great. Do you have any suggestions about the grid() problem - i.e. that the vertical gridlines do not line up with the x-axis tickmarks (which are years)? I can't see on what basis the vertical gridlines are being positioned, but it doesn't look good that they are not lined u

Re: [R] R 2.9.2 memory max - object vector size

2009-09-11 Thread gug
At the risk of stating the obvious: - rm(.) # clears specific objects out of memory as soon as they're no longer needed in the routine. - sapply(ls(), function(x) object.size(get(x))) #lists all objects with the memory each is using. - rm(list=ls()) #clears out all objects, e.g. be

Re: [R] format (?) problems with data imported from postgres

2009-09-11 Thread Tomas Lanczos
Being more specific: On Fri, 2009-09-11 at 17:03 +0200, Tomas Lanczos wrote: > Good day, > > I read some data from a PostgreSQL database by a following script: > > library(Rdbi) > library(RdbiPgSQL) > # conn becomes an object which contains the DB connection: > conn <- dbConnect(PgSQL(), host="l

Re: [R] Is there any "month" object like "LETTERS" ?

2009-09-11 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Don MacQueen > Sent: Friday, September 11, 2009 8:16 AM > To: Gabor Grothendieck; megh > Cc: r-help@r-project.org > Subject: Re: [R] Is there any "month" object like "LETTERS" ? >

Re: [R] RPostgreSQL package and libpq.dll file

2009-09-11 Thread Joe Conway
Lore M wrote: > Dear all, I'd like to use the package RPostgreSQL. I'm using R > version 2.8.1 and I've download the last version RPostgreSQL. When I > load the package, I get something like "the file LIBPQ.DLL is > missing". Do you have any idea about what I'm suppose to do ? Thanks > everyone. l

Re: [R] Is there any "month" object like "LETTERS" ?

2009-09-11 Thread Don MacQueen
On my R 2.9.2 installation, ?Constants just says "No documentation ...". I don't know why Gabor and I would have different results. However, ?LETTERS does provide the requested information. -Don At 7:30 AM -0400 9/11/09, Gabor Grothendieck wrote: See ?Constants On Fri, Sep 11, 2009 at 3:13 A

[R] State Space models in R

2009-09-11 Thread Giovanni Petris
Hello everybody, I am writing a review paper about State Space models in R, and I would like to cover as many packages as I reasonably can. So far I am familiar with the following tools to deal with SS models: * StructTS, Kalman* (in stats) * packages dse[1-2] * package sspir * package dlm I

Re: [R] Best R text editors?

2009-09-11 Thread Ramon Diaz-Uriarte
Ted, I think I share your feelings about mice (e.g., that is why I use window managers where the mouse is not needed or is actually discouraged) but ... On Fri, Sep 11, 2009 at 4:46 PM, Ted Harding wrote: > On 11-Sep-09 14:16:44, Clint Bowman wrote: >> On Fri, 11 Sep 2009, Duncan Murdoch wrote: >

[R] format (?) problems with data imported from postgres

2009-09-11 Thread Tomas Lanczos
Good day, I read some data from a PostgreSQL database by a following script: library(Rdbi) library(RdbiPgSQL) # conn becomes an object which contains the DB connection: conn <- dbConnect(PgSQL(), host="localhost", dbname="BVS", user="postgres", password = "***") query_duj_kal <- dbSendQuery(

Re: [R] Best R text editors?

2009-09-11 Thread Ted Harding
On 11-Sep-09 14:16:44, Clint Bowman wrote: > On Fri, 11 Sep 2009, Duncan Murdoch wrote: > >> On 11/09/2009 6:53 AM, (Ted Harding) wrote: >>> On 11-Sep-09 10:41:21, Jim Lemon wrote: >>> > On 09/11/2009 05:15 PM, Patrick Connolly wrote: >>> > > ... >>> > > | > and in previous versions, you coul

[R] Reading gzip data from a non zero file offset

2009-09-11 Thread Gregory Jefferis
Dear R users, I have a file that contains a text header followed by a gzipped data chunk. I thought I would be able to read this by doing something like this. con<-file('myfile','rb') header<-readLines(con,10) gzf<-gzcon(con) data<-readBin(gzf,"int",n=1e7) But what I find is that gzcon resets

[R] RPostgreSQL package and libpq.dll file

2009-09-11 Thread Lore M
Dear all, I'd like to use the package RPostgreSQL. I'm using R version 2.8.1 and I've download the last version RPostgreSQL. When I load the package, I get something like "the file LIBPQ.DLL is missing". Do you have any idea about what I'm suppose to do ? Thanks everyone. __

Re: [R] Mantel test least square line

2009-09-11 Thread swertie
Thank you it is what I was looking for. -- View this message in context: http://www.nabble.com/Mantel-test-least-square-line-tp25235402p25401329.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https:

Re: [R] Mapping factors to a new set of factors

2009-09-11 Thread james.arnold
Thanks Jorge, That is what I was looking for. Cheers, James From: Jorge Ivan Velez [mailto:jorgeivanve...@gmail.com] Sent: 08 September 2009 18:41 To: Arnold, James Cc: r-help@r-project.org Subject: Re: [R] Mapping factors to a new set of factors Hi James, Take a look at the "recode" function

Re: [R] Mapping factors to a new set of factors

2009-09-11 Thread james.arnold
Thanks a lot Phil, Recode is exactly what I was looking for. I managed to get my old function working using sapply, but the performance was horrendously slow! One other thing was that the lvls vector can only seem to be set within the global scope of R, and local variables within a function do

Re: [R] Mapping factors to a new set of factors

2009-09-11 Thread james.arnold
Thanks Jim, I managed to get my function to work by putting it within an sapply. Unfortunately the performance was terrible, so I've gone with the suggestion of other posters to use recode in the car package. Cheers, James -Original Message- From: jim holtman [mailto:jholt...@gmail.com

[R] voice recognition software

2009-09-11 Thread volinsky
Hello all. Has anyone out there had experience using R with voice recognition software? I got this query from a student with nerve damage in her hand who wants to program in R. Thanks, Chris __ R-help@r-project.org mailing list https://stat.ethz

Re: [R] Best R text editors?

2009-09-11 Thread Clint Bowman
On Fri, 11 Sep 2009, Duncan Murdoch wrote: On 11/09/2009 6:53 AM, (Ted Harding) wrote: On 11-Sep-09 10:41:21, Jim Lemon wrote: > On 09/11/2009 05:15 PM, Patrick Connolly wrote: > > ... > > | > and in previous versions, you could always do M-x cua-mode for > > | > the same effect. Talk ab

Re: [R] Graph visualization

2009-09-11 Thread Steve Lianoglou
Hi, On Sep 11, 2009, at 8:22 AM, Arber Ngjela wrote: Hello, I am working with graph and adjacency matrix, the package 'graph' seems to be appropriate for this. An example in the package mat <- rbind(c(0, 0, 1, 1), + c(0, 0, 1, 1), + c(1, 1, 0, 1), + c

Re: [R] Modify functions in base packages (needed for completion for proto objects)

2009-09-11 Thread Gabor Grothendieck
See ?assignInNamespace On Fri, Sep 11, 2009 at 10:02 AM, Vitalie S. wrote: > > Hello everyone, > > I am trying to implement completion for proto objects. Proto extends > environment in a hierarchical way. Thus completion should list all the names > in all it's parent environments. > > For "normal

Re: [R] Simple time series questions

2009-09-11 Thread Gabor Grothendieck
Here it is using zoo and classic graphics. 1. Just paste this into your R session: library(zoo) URL <- "http://www.nabble.com/file/p25398419/test%2Bchart%2Bdata.csv"; z <- read.zoo(URL, header = TRUE, format = "%d-%m-%y", sep = ",") cols <- c("green", "red", "blue") plot(z, screen = 1, col = c

  1   2   >