Re: [R] Representing 'Date' as 'Year - Quarter'

2008-05-31 Thread Gabor Grothendieck
The zoo package has a yearqtr class that can represent quarterly data. It is also possible to create zoo series of quarterly data. Such series can be converted to ts class and that class can some builtin support for quarterly data as well. library(zoo) as.yearqtr(200706, %Y%m) [1] 2007 Q2 The

[R] Regression Model with a Memory Covariate Process

2008-05-31 Thread Stefan Koenig
Dear all: I am searching for a regression model (e.g. y=Xb+e) in which dummy-coded events (to time point t) on different regressors in X exhibit an effect on subsequent responses in the vector y (to time-points t+1, t+2,… t+n). My aim is to estimate how long the memory effect is and how strong

[R] How to adaptively sample a simulated population of individuals

2008-05-31 Thread Krishna Pacifici
Hello, I am looking for advice on how to adaptively sample from a simulated population. I have simulated a population of individuals in a matrix and need to do the following: 1) select a random sample from that population 2) apply a function to that sample to determine if I detect any

[R] problems with package.skeleton

2008-05-31 Thread cgenolin
Hi the list, I do not manage to build a package using package.skeleton. My pacakge in called 'partition' I run package.skeleton, then I write the Rd file. R CMD check partition is ok But R CMD build --binary partition does not compile. I get : WARNING * some HTML links may not be found

Re: [R] problems with package.skeleton

2008-05-31 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Hi the list, I do not manage to build a package using package.skeleton. My pacakge in called 'partition' I run package.skeleton, then I write the Rd file. R CMD check partition is ok But R CMD build --binary partition does not compile. I get : WARNING * some

[R] Advice for working with Sammon's Projection on image data

2008-05-31 Thread B. Bogart
Hello all, I'm working on a project that uses a SOM to generate feature maps from image data. Each image is a 100x75 pixels and RGBA, so 30,000 elements per image. I wanted to observe the structure of the pixel by pixel euclidean distance (where each image is a point in 30,000 dimensional space)

Re: [R] R and Openmpi

2008-05-31 Thread Dirk Eddelbuettel
Paul, On 30 May 2008 at 15:47, Paul Hewson wrote: | Hello, | | We have R working with Rmpi/openmpi, but I'm a little worried. Specifically, (a) the -np flag doesn't seem to override the hostfile (it works fine with fortran hello world) and (b) I appear to have twice as many processes

[R] How to add space between main title to leave space for legend?

2008-05-31 Thread Paul Johnson
Hello, everybody: I recently encountered an example with in which the graph was placed in a way that did not leave room for a legend. Maybe you would describe it as legend too big, I'm not sure. I found myself wishing I could force in some space after the title. Here's working example where

Re: [R] How to add space between main title to leave space for legend?

2008-05-31 Thread Peter Dalgaard
Paul Johnson wrote: Hello, everybody: I recently encountered an example with in which the graph was placed in a way that did not leave room for a legend. Maybe you would describe it as legend too big, I'm not sure. I found myself wishing I could force in some space after the title. Here's

[R] How to identify overlapped items from two list and plot them?

2008-05-31 Thread ss
Hi list, I have a question on how to identify the overlapped items from two vectors: x-c(0,1,2) y-c(1,2,2,3) and plot the number of the overlapped as well as non-overlapped in a diagram? Thanks much, Allen [[alternative HTML version deleted]]

Re: [R] How to add space between main title to leave space for legend?

2008-05-31 Thread Gabor Grothendieck
Is this ok? set.seed(1) # ... your code ... legend(topright, title = Legend, legend=c(observed density, normal with \nobserved mean\n sd, normal with \n'true' mean sd), lty = 1:3, col = 1:3, box.lty = 0, text.width = 1.1, cex = 0.7) On Sat, May 31, 2008 at 3:06 PM, Paul Johnson [EMAIL

[R] Loading data into a list of environments

2008-05-31 Thread Powell, Jeff
Dear All, Thanks to an answer which I received from a previous post, I'm now able to create a series of environments using the following: nmes - c(en1, en2, en3) for(i in nmes) assign(i, new.env(parent = .GlobalEnv)) My next question is how, using load, can I automatically place data into

[R] KPSS test - Lag selection

2008-05-31 Thread Florian E.
Hello everyone! Quite a similar question has been posed here some time ago, but there was no explicit solution offered. So I hope that it is OK to pose it again. I want to perform a KPSS test using the packages urca or tseries. But I neither want to use the predefined lag structures, short and

Re: [R] Is variable in one vector part of variable in another

2008-05-31 Thread Dr. S. B. Nguah
darthgervais wrote: I have 2 vectors x z x has 10 variables in it z has 75 variable in it I need to check all 75 variables in z and see if they are present in the vector x. So far this is what I have: for (i in 0:75){ if (z[i]==x) (w=w+1) } Thanks in advance w Try:

[R] Is variable in one vector part of variable in another

2008-05-31 Thread darthgervais
I have 2 vectors x z x has 10 variables in it z has 75 variable in it I need to check all 75 variables in z and see if they are present in the vector x. So far this is what I have: for (i in 0:75){ if (z[i]==x) (w=w+1) } Thanks in advance w -- View this message in context:

[R] figuring out the results from hclust

2008-05-31 Thread Karin Lagesen
I have two examples that I run hclust on: a = c(0,1,1.5,1.5) b = c(1,0,1.5,1.5) c = c(1.5,1.5,0,0.5) d = c(1.5,1.5,0.5,0) ll = as.matrix(rbind(a,b,c,d)) test = as.dist(ll) long = hclust(test) a = c(0,0.3,1,1) b = c(0.3,0,1,1) c = c(1,1,0,0.5) d = c(1,1,0.5,0) ll = as.matrix(rbind(a,b,c,d)) test

Re: [R] How to identify overlapped items from two list and plot them?

2008-05-31 Thread Ben Tupper
Hello, On May 31, 2008, at 4:10 PM, ss wrote: Hi list, I have a question on how to identify the overlapped items from two vectors: x-c(0,1,2) y-c(1,2,2,3) You can use the %in% operator to return a logical vector that indicates the overlap. x-c(0,1,2) y-c(1,2,2,3) y %in% x [1]

Re: [R] Is variable in one vector part of variable in another

2008-05-31 Thread Philipp Pagel
I have 2 vectors x z x has 10 variables in it z has 75 variable in it I need to check all 75 variables in z and see if they are present in the vector x. In addition to the solution using %in% which has already been suggested, you may also want to play with something like this: # make up

Re: [R] Loading data into a list of environments

2008-05-31 Thread Charles C. Berry
On Sat, 31 May 2008, Powell, Jeff wrote: Dear All, Thanks to an answer which I received from a previous post, I'm now able to create a series of environments using the following: nmes - c(en1, en2, en3) for(i in nmes) assign(i, new.env(parent = .GlobalEnv)) My next question is how, using

Re: [R] How to identify overlapped items from two list and plot them?

2008-05-31 Thread Philipp Pagel
I have a question on how to identify the overlapped items from two vectors: x-c(0,1,2) y-c(1,2,2,3) intersect(x,y) and plot the number of the overlapped as well as non-overlapped in a diagram? Are you talking about a Venn diagram? There is a vennDiagram function in the limma package and

[R] tolstoi.newcastle dead?

2008-05-31 Thread Carl Witthoft
Anyone know what's up w/ tolstoi.newcast.edu.au (home of the threaded R-help archives)? I've got a can't connect for several days now. Carl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] package.skeleton again

2008-05-31 Thread cgenolin
Hi the list I do not manage to build a package using package.skeleton. My pacakge in called 'partition' I have no probleme to source the file. Then I run package.skeleton(partition) I get : Saving function and data... Error in file(file,ifelse(append,a,w)): impossible to open the connexion

[R] function

2008-05-31 Thread admin
hi i have to make my function y=b*(1-exp(lambda*(t^m)) and my data are in excel file with names: Year /b/lambda/m and t is an age in another file calls pcb could u help me please to calculate all y for all years please i can make this step by step but i want an program for having all y and plot

[R] Cannot handle object of mode list

2008-05-31 Thread Handayani Situmorang
Hello..!!! I got a problem while built R program with tcltk. I try to list the name of all data frame in my memory by tklistbox. when we choose the name of data frame, then i capture the name, and catch the data frame by tclObj(dat)-as.data.frame(get(x,envir=.GlobalEnvir))

[R] optim error

2008-05-31 Thread keunhchoi
I saw a similar question but I still don't fully understand how to implement optim. Can someone help me out with this? Thanks. Keun-Hyung vol-rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) time-rep(c(2,4,8),each=7) p.mated-c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, null, 0.68, 0.62, 0.64, 0.58, 0.53, 0.47,