Re: [R] How to check for missing report pages per client

2010-10-21 Thread Dimitris Rizopoulos
one approach is the following: DF <- read.table(textConnection( "client page 730001 46101 730001 46102 730019 46101 730035 46101 730040 46101 730040 46102 730040 46104 730040 46105 730052 46101 730052 46102 730074 46101 730074 46102 730074 46103"), header = TRUE) closeAllConnections() DF$d

Re: [R] Two-Way Joining or Clustering

2010-10-21 Thread Muhammad Yaseen
*Hi Folks,* * * *I want to do two-way joining or clustering as described in STATISTICA website *http://www.statsoft.com/textbook/cluster-analysis/#twotwo. *Any suggestion and/or help will be highly appreciated. Thanks* * * *Regards!* -- * Muhammad Yaseen * [[alternative HTML version del

[R] All other variables in upper scope arg for stepAIC

2010-10-21 Thread Paul Chatfield
Hi - I am trying to substitute for "the_other_y" in the code below. I want y2 and y3 to be there when i is 1, y1 and y3 to be there when i is 2 and y1 and y2 to be there when i is 3. I'm sure it's to do with what format the data should be in and I've tried alldata[,-i], but it fits all the colum

Re: [R] R crashes when loading rgl package before minqa package

2010-10-21 Thread ippopappo
Hi! I have been using R for two years, but since last week I have a problem with rgl, using R 2.12 on Ubuntu 10.04. In fact, when I load rgl with library(), before any other command, I have the following error message. Could anybody help me? Thanks in advance, # + library(rgl) ***

Re: [R] Plot help

2010-10-21 Thread Jim Lemon
On 10/20/2010 08:34 PM, Peter Francis wrote: Dear List, I am relatively new to R and am trying to create more attractive plots than excel can manage! I have looked through the various programmes ggplot, lattice, hmisc etc but my case seems to be not metnioned, maybe it is but i have not notic

[R] Efficient nested loops

2010-10-21 Thread Francisco Javier Santos Alamillos
Dear R community, I am working with huge arrays, so I spend a lot of time computing. This is my code: for (x in 1:dim(variable)[1]){ for (y in 1:dim(variable)[2]){ for (z in 1:dim(variable)[3]){ result <- max(variable[x,y,z,]) } } } Is there a more efficient p

Re: [R] histograms resulting from call to soil.texture

2010-10-21 Thread Jim Lemon
On 10/21/2010 10:03 AM, emorway wrote: Hello, Using the dataset below I produce a soil.texture plot (R code for this included at the end). One will notice I have plotted the points based on whether or not they are in a region called 'upstream' or 'downstream'. I'm curious if there is a way to

[R] Conversion of S+ libraries

2010-10-21 Thread Treacy, Glenn
Does anyone have any advice on converting S+ libraries to R packages? Glenn -- ** Irish Life Investment Managers Limited is regulated by the Central Bank of Ireland. Irish Life Investment Managers Limited Registere

[R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread J . delasHeras
I have just started using the package 'rgl' to explore my data as a 3D scatterplot. It's a great tool. But I would like to be able to save some graph views and it appears the only format available is 'png' and it doesn't look that nice. It is excellent to work with on screen and explore

[R] Odp: Efficient nested loops

2010-10-21 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 21.10.2010 10:40:40: > Dear R community, > > I am working with huge arrays, so I spend a lot of time computing. This is > my code: > > for (x in 1:dim(variable)[1]){ > for (y in 1:dim(variable)[2]){ > for (z in 1:dim(variable)[3]){ >

[R] Different time between date() and Sys.date()

2010-10-21 Thread omerle
Hi, I got two different times between these functions : > date() [1] "Thu Oct 21 12:11:37 2010" > Sys.time() [1] "2010-10-21 10:11:40 GMT" > I know that its because I did Sys.setenv(TZ="GMT"). Even if my system is set by default at CEST. I think that the difference between date() and Sys.time()

[R] test

2010-10-21 Thread Treacy, Glenn
-- ** Irish Life Investment Managers Limited is regulated by the Central Bank of Ireland. Irish Life Investment Managers Limited Registered Office: Beresford Court, Beresford Place, Dublin 1. Registered in Irelan

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Keith Jewell
"Sadz A" wrote in message news:419230.77523...@web24610.mail.ird.yahoo.com... > Hi, > > I am trying to do some calculations turning DMS data to decimal degrees > using > the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the > easiest way to do the calculation is to use absol

Re: [R] Two-Way Joining or Clustering

2010-10-21 Thread Michael Bedward
Hi Muhammad, Have a look at the biclust package... http://cran.r-project.org/web/packages/biclust/index.html Michael On 21 October 2010 18:00, Muhammad Yaseen wrote: > *Hi Folks,* > * > * > *I want to do two-way joining or clustering as described in STATISTICA > website *http://www.statsoft.com

Re: [R] Accuracy/Goodness of fit of nnet

2010-10-21 Thread Claudia Beleites
Raji, you first need to tell us what kind of accuracy you mean. The term accuracy has different meanings in different areas of science. However, in classification it usually refers to something along the line number of correctly predicted samples / total number of samples (possibly weighted ac

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Duncan Murdoch
j.delashe...@ed.ac.uk wrote: I have just started using the package 'rgl' to explore my data as a 3D scatterplot. It's a great tool. But I would like to be able to save some graph views and it appears the only format available is 'png' and it doesn't look that nice. It is excellent to work

Re: [R] histograms resulting from call to soil.texture

2010-10-21 Thread Julien Moeys
Hi Eric The package "soiltexture" has a function (TT.points.in.classes) to classify soil texture data according to various soil texture triangles. It is based on the function point.in.polygon() from the sp package. See the example below, based on your example code. (The package has a rather

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Dieter Menne
Jose de las Heras wrote: > > > 3) it would be interesting to produce a simple movie, maybe just a > 360-degree rotation. Is there a package geared towards that, or do I just > simply create a collection of images that I animate elsewhere? > > I used that approach, and it works well. Diet

Re: [R] Accuracy/Goodness of fit of nnet

2010-10-21 Thread Raji
Hi Claudia, I am a novice to statistics and R.The information you have provided is really very helpful.Thank you. I was using the neural network in SPSS in which we can figure out the maximum accuracy (in %) that is possible with the model for the current dataset.It also gives the estimated accu

[R] Plotting factors in biplots

2010-10-21 Thread Alejo C.S.
Dear list, I'm trying to make a biplot, but instead of plotting the row numbers for each observation, I'd like to plot a group factor. Example: prcomp(iris[,1:4]) -> PCA biplot(PCA) #this makes a nice biplot but with row names Instead of row numbers I want to plot iris[,5], which is a factor.

Re: [R] Help: Using vectorization method for vectors comparision

2010-10-21 Thread jim holtman
try this: > a <- c(5, 10, 13, 19, 23) > > b <- c(1, 4, 7, 9, 15) > # use outer for comparison > z <- outer(a, b, ">") > # use rowSums to get the indices (may have to check for zero) > b[rowSums(z)] [1] 4 9 9 15 15 > On Wed, Oct 20, 2010 at 10:41 PM, bruclee wrote: > > I am trying to compare

Re: [R] Efficient nested loops

2010-10-21 Thread Petr PIKAL
Hi fjsan...@gmail.com napsal dne 21.10.2010 12:44:30: > Hi Petr, thanks for your help. > > My array has four dimensions. My problem is the next: > > library(survival) > initial <- array(rnorm(120),c(40,30,20,50)) > final <- array(0, dim=c(dim(initial)[1],dim(initial)[2],dim(initial)[3])) >

Re: [R] All other variables in upper scope arg for stepAIC

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 4:21 AM, Paul Chatfield wrote: Hi - I am trying to substitute for "the_other_y" in the code below. I want y2 and y3 to be there when i is 1, y1 and y3 to be there when i is 2 and y1 and y2 to be there when i is 3. I'm sure it's to do with what format the data should

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Duncan Murdoch
j.delashe...@ed.ac.uk wrote: I have just started using the package 'rgl' to explore my data as a 3D scatterplot. It's a great tool. But I would like to be able to save some graph views and it appears the only format available is 'png' and it doesn't look that nice. It is excellent to work

Re: [R] Efficient nested loops

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 4:40 AM, Francisco Javier Santos Alamillos wrote: Dear R community, I am working with huge arrays, so I spend a lot of time computing. This is my code: for (x in 1:dim(variable)[1]){ for (y in 1:dim(variable)[2]){ for (z in 1:dim(variable)[3]){ resu

Re: [R] Different time between date() and Sys.date()

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 6:19 AM, omerle wrote: Hi, I got two different times between these functions : date() [1] "Thu Oct 21 12:11:37 2010" Sys.time() [1] "2010-10-21 10:11:40 GMT" I know that its because I did Sys.setenv(TZ="GMT"). Even if my system is set by default at CEST. I think t

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 5:49 AM, j.delashe...@ed.ac.uk wrote: I have just started using the package 'rgl' to explore my data as a 3D scatterplot. 3) it would be interesting to produce a simple movie, maybe just a 360-degree rotation. Is there a package geared towards that, or do I just si

[R] R-2.12.0 hangs while installing some packages on FreeBSD

2010-10-21 Thread Rainer Hurling
I am working with R-2.12.0 on FreeBSD 9.0-CURRENT for a while now. I successfully installed more than 300 packages (most as dependencies of others). There are two packages I am not able to install: RGtk2 and rggobi. For example rggobi builds fine and after that it wants to load: -

Re: [R] Plot creates a straigth line

2010-10-21 Thread 1Rnwb
Thanks Jim for the explanation. I will modify the code accordingly -- View this message in context: http://r.789695.n4.nabble.com/Plot-creates-a-straigth-line-tp3004090p3005569.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-

[R] SVM classification based on pairwise distance matrix

2010-10-21 Thread Martin Tomko
Dear all, I am exploring the possibilities for automated classification of my data. I have successfully used KNN, but was thinking about looking at SVM (which I did nto use before). I have a pairwise distance matrix of training observations which are classified in set classes, and a distance mat

[R] Big data (over 2GB) and lmer

2010-10-21 Thread Michal Figurski
Dear R-helpers I have a data set of roughly 10 million records, 7 columns. It has only about 500MB as a csv, so it fits in the memory. It's painfully slow to do anything with it, but it's possible. I also have another dataset of covariates that I would like to explore - with about 4GB of data.

Re: [R] R-2.12.0 hangs while installing some packages on FreeBSD

2010-10-21 Thread Prof Brian Ripley
On Thu, 21 Oct 2010, Rainer Hurling wrote: I am working with R-2.12.0 on FreeBSD 9.0-CURRENT for a while now. I successfully installed more than 300 packages (most as dependencies of others). There are two packages I am not able to install: RGtk2 and rggobi. For example rggobi builds fine an

[R] error opening connection 64bit R under win7 64bit

2010-10-21 Thread dan...@labuenaestrella.com.ar
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I just installed R (2.11.1) 64bit under Windows 7 64 bit When trying to readin files I get the following error message: > > source(file="C:\\Users\\me\\Documents\\My PhD\\Modelling\\R\\Scripts\\Functions\\functions 20jan10.r") Error in file(fi

[R] Adding rows to column

2010-10-21 Thread amb1networks
I'm new to R. I'm extracting important columns from single table using following code: File2<-"file.txt" table2<- read.delim(File2, skip=19, sep=";", header=F, na.strings=NA, fill=T) #extracting column 7 where rows match "ID" col1<- table2[grep("ID", table2[,1]),7] #similarly extracting column 9

Re: [R] fitted from plm

2010-10-21 Thread max . e . brown
Thanks Giovanni and Achim. Just to confirm - the order of observations in residuals(mymodel) is exactly the same as in the dataframe that I pass to plm, so that I can extract the fitted values for an individual by calculating yhat = y - residuals(mymodel) as you describe, and then pick out indi

Re: [R] Adding rows to column

2010-10-21 Thread Ivan Calandra
Hi! Would df<- table2[grep("ID",table2[,1]), c(7,9,11,13,15)] do what you expect? Ivan Le 10/21/2010 15:42, amb1networks a écrit : I'm new to R. I'm extracting important columns from single table using following code: File2<-"file.txt" table2<- read.delim(File2, skip=19, sep=";", header=

Re: [R] Efficient nested loops

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 8:39 AM, Petr PIKAL wrote: Hi fjsan...@gmail.com napsal dne 21.10.2010 12:44:30: Hi Petr, thanks for your help. My array has four dimensions. My problem is the next: library(survival) initial <- array(rnorm(120),c(40,30,20,50)) final <- array(0, dim=c(dim(initial)[

Re: [R] question on optim() fn.

2010-10-21 Thread Ravi Varadhan
As I said before, you get NaNs whenever the iterates are such that they are mathematically infeasible. This could very much depend on the starting value for the optimizer, as you have observed, because the trajectories of the optimizer can be widely different when started from diffrent paramete

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread David Winsemius
With permission I am copying a private communication to the list. On Oct 21, 2010, at 9:20 AM, Sadz A wrote: Hi, I think maybe I did not explain myself properly, I'll try again; I am trying to convert location data in DMS degrees to decimal degrees format. I have attached my data and belo

Re: [R] R-2.12.0 hangs while loading RGtk2 on FreeBSD

2010-10-21 Thread Rainer Hurling
Am 21.10.2010 16:12 (UTC+1) schrieb Prof Brian Ripley: On Thu, 21 Oct 2010, Rainer Hurling wrote: I am working with R-2.12.0 on FreeBSD 9.0-CURRENT for a while now. I successfully installed more than 300 packages (most as dependencies of others). There are two packages I am not able to install

[R] R: fitted from plm

2010-10-21 Thread Millo Giovanni
Hi Max. You're welcome. Re your question below, the input order is not always preserved: observations are always reordered by (individual, time) internally, so that the output you get is ordered accordingly. Most of the time, this is also the order you'd input them, but this is not necessarily s

Re: [R] SVM classification based on pairwise distance matrix

2010-10-21 Thread Steve Lianoglou
Hi, On Thu, Oct 21, 2010 at 9:42 AM, Martin Tomko wrote: > Dear all, > I am exploring the possibilities for automated classification of my > data. I have successfully used KNN, but was thinking about looking at > SVM (which I did nto use before). > I have a pairwise distance matrix of training ob

Re: [R] Different time between date() and Sys.date()

2010-10-21 Thread omerle
Thanks for you answer. It s sufficient but I d like to know why my system think I am CEST and yours think your are EDT. Can I change it ? Do you know where can I find a list of the timezone ? > Message du 21/10/10 15:07 > De : "David Winsemius" > A : "omerle" > Copie à : r-help@r-project.org > O

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Sadz A
Thank you so much! From: David Winsemius Cc: r-help r-help Sent: Thu, 21 October, 2010 15:43:37 Subject: Re: [R] Changing sign on absolute numbers 0 problems With permission I am copying a private communication to the list. On Oct 21, 2010, at 9:20 AM, Sadz

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Keith Jewell
In case it helps... > test <- c("-0:00:53", "-0:01:10.", "-0:01:26.", "-0:01:38.", "-0:01:43", + "-0:01:59.", "-0:03:50.", "-0:04:46", "-0:05:01.", "-0:05:16.", + "3:41:33.0", "3:43:09.4", "3:44:26.3", "3:47:26.0", "3:48:19.3", + "3:52:13.4", "3:57:10.2", "4:29:37.6", "5:01:28.4", "5:08:45.6" ) >

Re: [R] SVM classification based on pairwise distance matrix

2010-10-21 Thread Martin Tomko
Hi Steve, tahnks for the hints and clarifications. Unfortunately, I will not be able to use the approach you suggest, The distances I generate are distances between VERY large matrices (say 10x10 and more) each of different dimensions (not necessarily square either), and there is no si

Re: [R] removing rows from a matrix using condition within groups

2010-10-21 Thread swam
I tired this and seems to capture only a few -- View this message in context: http://r.789695.n4.nabble.com/removing-rows-from-a-matrix-using-condition-within-groups-tp3004132p3005894.html Sent from the R help mailing list archive at Nabble.com. __ R-

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread 1Rnwb
my question is exactly as described in this post http://tolstoy.newcastle.edu.au/R/e2/help/07/02/9812.html i am doing the pattern search using a vector 'vars[vi]' where i cannot use '^vars[vi]$' for a exact pattern match -- View this message in context: http://r.789695.n4.nabble.com/grep-tp30044

Re: [R] removing rows from a matrix using condition within groups

2010-10-21 Thread swam
thanks Henrique , it did work with a slight modif subset(merge(X, Y, by.x = 'groups', by.y = 1, all = TRUE), var2http://r.789695.n4.nabble.com/removing-rows-from-a-matrix-using-condition-within-groups-tp3004132p3005899.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] error opening connection 64bit R under win7 64bit

2010-10-21 Thread Prof Brian Ripley
I see nothing that says the file you are trying to source cannot be opened. I suspect it is a file mentioned in the script (that we don;t have). On Thu, 21 Oct 2010, dan...@labuenaestrella.com.ar wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I just installed R (2.11.1) 64bit un

[R] data.frame query

2010-10-21 Thread Etn
Hi All, Apologies for the simplicity of my question, but I would be grateful for any advice. Thanks I'm trying to put the output from a for loop into a data frame, however I have not been successful. The steps I have taken are: *R-code:* >for (k in 1:(nt-1-n0) ){ >n<- n0-1+k >lam=n/n

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 12:17 PM, 1Rnwb wrote: my question is exactly as described in this post http://tolstoy.newcastle.edu.au/R/e2/help/07/02/9812.html You are citing a 3 year-old message that had multiple contributors. Either it wasn't answered by Dalgaard or your question is different.

[R] Levels of interaction terms between numeric and factor in glm

2010-10-21 Thread achilles tsoumanis
Hello everyone, I have been working on a model to describe the counts of a certain event. I use glm function with Poisson family and log link. the model is: model<-glm(event~week+year+week:var1+year:var1+year:var2, family=poisson), where week and season are factor variables with 52 and 7 leve

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread J . delasHeras
Quoting Duncan Murdoch : j.delashe...@ed.ac.uk wrote: I have just started using the package 'rgl' to explore my data as a 3D scatterplot. It's a great tool. But I would like to be able to save some graph views and it appears the only format available is 'png' and it doesn't look that

Re: [R] data.frame query

2010-10-21 Thread Dennis Murphy
Hi: Does this work? mdat <- function(nt, n0, n1) { l <- nt - n0 - 1 k <- seq(l) # same as 1:l n <- n0 - 1 + k lam <- n/nt Q <- seq(n1)[n] data.frame(k = k, n = n, lam = lam, Q = Q) } > mdat(20, 5, 20) k n lam Q 1 1 5 0.25 5 2 2 6 0.30 6 3 3 7 0.3

Re: [R] data.frame query

2010-10-21 Thread Adrienne Wootten
Try this: before your loop put this output1 <- NULL in the loop at the end put this temp <- data.frame(cbind(k,n,lam,Q)) output1 <- rbind(output1,temp) this should do the trick for you Adrienne NCSU On Thu, Oct 21, 2010 at 12:52 PM, Etn <2nuzz...@gmail.com> wrote: > Hi All, > > Apologies fo

Re: [R] data.frame query

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 12:52 PM, Etn wrote: Hi All, Apologies for the simplicity of my question, but I would be grateful for any advice. Thanks I'm trying to put the output from a for loop into a data frame, however I have not been successful. The steps I have taken are: *R-code:* fo

Re: [R] data.frame query

2010-10-21 Thread J . delasHeras
you forgot to include "output1" in your cbind call. what I normally do is initialise the variable where I want to store the dataframe prior to starting the loop: output1<-NULL then run the loop, and within it there should be a: output1<-cbind(output1, newdata) where 'newdata' will be the

[R] Help: From Excel date to R-date!

2010-10-21 Thread Amy Young-King
Hi all, I am really new to dealing with Excel date and time formats to be used in R. I have an Excel exported data matrix in TXT format. One column, labeled DATE, is of the following format examples: 1/8/98 1:00 1/8/98 23:00 to mean that the observation was made on 1st of August 1998 at 1AM

Re: [R] Help: From Excel date to R-date!

2010-10-21 Thread Prof Brian Ripley
If those are the only formats and the dates are in the current timezone ... dates <- c("1/8/98 1:00", "1/8/98 23:00") as.POSIXct(dates, format = "%d/%m/%y %H:%M") [1] "1998-08-01 01:00:00" "1998-08-01 23:00:00" As for how to handle such a time series in R, it depends if it is a regular or ir

Re: [R] Help: From Excel date to R-date!

2010-10-21 Thread Gabor Grothendieck
On Thu, Oct 21, 2010 at 1:31 PM, Amy Young-King wrote: > Hi all, > > I am really new to dealing with Excel date and time formats to be used in R. > > I have an Excel exported data matrix in TXT format. > > One column, labeled DATE, is of the following format examples: > > > 1/8/98 1:00 > 1/8/98 23

Re: [R] Different time between date() and Sys.date()

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 11:59 AM, omerle wrote: Thanks for you answer. It s sufficient but I d like to know why my system think I am CEST and yours think your are EDT. It probably acquired it from your OS at the time of R's installation. (And that was not correct as I discovered.) Can I ch

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Duncan Murdoch
On 21/10/2010 1:23 PM, j.delashe...@ed.ac.uk wrote: Quoting Duncan Murdoch: > j.delashe...@ed.ac.uk wrote: >> I have just started using the package 'rgl' to explore my data as a >> 3D scatterplot. >> >> It's a great tool. But I would like to be able to save some graph >> views and it appea

[R] printing a variable during a loop

2010-10-21 Thread Antonio Olinto
Hello, About looping, consider the example: for (i in 1:23194) { dat.stat[i,c(2:8)]<-quantile(dat.bat[BL==block[i],2],prob=c(0,0.025,0.25,0.5,0.75,0.975,1)) print(i) } I'd like to have the value of "i" printed for each loop (step). As I could see the values of "i" are shown on screen only aft

[R] How to access values in s4 method

2010-10-21 Thread Fahim Md
Hi How to access the values in the output that is an object of S4 type. I tried to access using subset ( [ ] ) but it is not allowed. Any clue?? Thanks -- Fahim #My code is as follows: require(IRanges); query <- IRanges(c(1, 4, 9), c(5, 7, 10)) subject <- IRanges(c(2, 2, 10), c(2, 3, 12)) findO

[R] Help saving multiple graphics

2010-10-21 Thread briandavispdx
I'm a new-ish user using a for loop to create many hundreds of plots. I'm using the "par" function to create them in a 2x2 graphics window. What I'd like to do is output this 4-up graphic to a file every four plots. I really don't care what the filename is, but it would be useful to be able

Re: [R] printing a variable during a loop

2010-10-21 Thread Adrienne Wootten
instead of print use this message(i) the message command is used for things like this and it will print the value of i as you are looping through, but you can also do this: message("Counter value is: ",i) which returns for i = 20 for example "Counter value is 20" for more check out the messag

[R] gam plots and seWithMean

2010-10-21 Thread Greg Dropkin
hello I'm learning mgcv and would like to obtain numerical output corresponding to plot.gam. I can do so when seWithMean=FALSE (the default) but only approximately when seWithMean=TRUE. Can anyone show how to obtain the exact values? Alternatively, can you clarify the explanation in the manual

Re: [R] Help saving multiple graphics

2010-10-21 Thread Adrienne Wootten
You can get all the plots into one file of any name using the pdf command pdf(filename,onefile=TRUE) place this before your loop and say this after your loop dev.off() to stop writing pictures to that pdf file. In this way you can capture lots of images, but be careful. They will be really hi

Re: [R] Help saving multiple graphics

2010-10-21 Thread briandavispdx
Adrienne, Perfect, that's exactly what I wanted... I was making it more complicated than it needed to be, which I had a sneaking suspicion might be the case. Thank you for the help! -- View this message in context: http://r.789695.n4.nabble.com/Help-saving-multiple-graphics-tp3006044p3006073.

Re: [R] fitted from plm

2010-10-21 Thread Max Brown
Wow, thanks for the very detailed reply! Max __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, r

[R] problem with D(COM) Server

2010-10-21 Thread Deschamps, Benjamin
Hi everyone, I am encountering issues with D(COM) Server 3.0-1B5 and R 2.12.0. They are installed in "C:\Program Files\R\D(COM) Server" and "C:\Program Files\R\R-2.12.0", respectively, both installed with the default settings. When I try the "basic test" application, I get the message: Load

Re: [R] How to access values in s4 method

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 8:05 PM, Fahim Md wrote: Hi How to access the values in the output that is an object of S4 type. I tried to access using subset ( [ ] ) but it is not allowed. Any clue?? Thanks -- Fahim #My code is as follows: require(IRanges); query <- IRanges(c(1, 4, 9), c(5, 7, 10)

Re: [R] printing a variable during a loop

2010-10-21 Thread Antonio Olinto
Thanks Adrienne, but I still in doubt. The behavior of print and message looks the same. Nothing is displayed on the screen after minutes of routine processing . All values of "i" are displayed only when I press the stop button (I'm under Windows) or when "i" reaches the maximum value. Th

Re: [R] Big data (over 2GB) and lmer

2010-10-21 Thread Ben Bolker
Michal Figurski mail.med.upenn.edu> writes: > I have a data set of roughly 10 million records, 7 columns. It has only > about 500MB as a csv, so it fits in the memory. It's painfully slow to > do anything with it, but it's possible. I also have another dataset of > covariates that I would like

Re: [R] printing a variable during a loop

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 8:58 PM, Antonio Olinto wrote: Thanks Adrienne, but I still in doubt. The behavior of print and message looks the same. Nothing is displayed on the screen after minutes of routine processing . All values of "i" are displayed only when I press the stop button (I'm unde

Re: [R] printing a variable during a loop

2010-10-21 Thread Joshua Wiley
On Thu, Oct 21, 2010 at 12:03 PM, David Winsemius wrote: > > On Oct 21, 2010, at 8:58 PM, Antonio Olinto wrote: > >> Thanks Adrienne, but I still in doubt. The behavior of print and message >> looks the same. >> >> Nothing is displayed on the screen after minutes of routine processing . >> All val

Re: [R] How to access values in s4 method

2010-10-21 Thread Steve Lianoglou
Hi Fahim, On Thu, Oct 21, 2010 at 2:05 PM, Fahim Md wrote: > Hi > How to access the values in the output that is an object of S4 type. I tried > to access using subset ( [ ] ) but it is not allowed. > Any clue?? A few things: (1) You generally shouldn't cross post between two lists (2) This is

[R] previous business day

2010-10-21 Thread Li, Jing Yi
How to get the previous business day in R? I saw some post about using functions in timeSeries package before but can not find it anymore. Thanks! === Please access the attached hyperlink for an important el...{{dropped

Re: [R] previous business day

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 9:38 PM, Li, Jing Yi wrote: How to get the previous business day in R? I saw some post about using functions in timeSeries package before but can not find it anymore. ??holiday Perhaps you should look in the "tis" package. Thanks! David Winsemius, MD West Hartford,

Re: [R] printing a variable during a loop

2010-10-21 Thread Antonio Olinto
Thanks Joshua, David and Adrienne for the attention. flush.console() was what I need. All the best, Antonio Citando Joshua Wiley : On Thu, Oct 21, 2010 at 12:03 PM, David Winsemius wrote: On Oct 21, 2010, at 8:58 PM, Antonio Olinto wrote: Thanks Adrienne, but I still in doubt. The beha

[R] RandomForest Proximity Matrix

2010-10-21 Thread Michael Lindgren
Greetings R Users! I am posting to inquire about the proximity matrix in the randomForest R-package. I am having difficulty pushing very large data through the algorithm and it appears to hang on the building of the prox matrix. I have read on Dr. Breiman's website that in the original code a ch

Re: [R] previous business day

2010-10-21 Thread Henrique Dallazuanna
Try this: f <- function(d)if(format(d - 1, '%w') %in% c(0, 6)) Recall(d - 1) else d - 1 d <- Sys.Date() f(d) On Thu, Oct 21, 2010 at 5:38 PM, Li, Jing Yi wrote: > How to get the previous business day in R? I saw some post about using > functions in timeSeries package before but can not find it a

Re: [R] previous business day

2010-10-21 Thread Clint Bowman
May also wish to "or" in a check for holidays. -- Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600FAX:(36

Re: [R] previous business day

2010-10-21 Thread Li, Jing Yi
Yeah, thanks Henrique for the code. It works! But I also have the questions for the holidays. Please follow the attached hyperlink to an important disclosure: http://www.credit-suisse.com/legal/marketcommentary -Original Message- From: Clint Bowman [mailto:cl...@ecy.wa.gov] Sent: Thu

Re: [R] previous business day

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 4:20 PM, Li, Jing Yi wrote: Yeah, thanks Henrique for the code. It works! But I also have the questions for the holidays. > require(tis) > previousBusinessDay(Sys.Date()-1:3) [1] 20101019 20101018 20101015 class: ti It runs on US "business days". You might be able to ha

Re: [R] previous business day

2010-10-21 Thread Li, Jing Yi
Thanks a lot for all your reply! It really helps! Somehow I remember there is some package which can provide financial exchange calendars, like NYSE holidays, not sure where to find it. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Thursday, October 21,

[R] R+DEV 2010 Developers Conference

2010-10-21 Thread Sue Turner
Dear useRs, Two last minute seats have become available for our R+DEV 2010. First come first serve. Register at www.xlsolutions-corp.com/conf.asp Regards - Sue Turner Senior Account Manager XLSolutions Corporation North American Division 1700 7th Ave Suite 2100 Seattle, WA 98101 Phone:

[R] Calculating variances in a moving window

2010-10-21 Thread Philippe Hensel
I am trying to create basic descriptive statistics for a spatial dataset using moving windows of variable sizes. I found the filter(dataset, rep(1/a,1)) very useful for obtaining averages for a given moving window size "a" (a is the window size within a column of data in a matrix - the filter

[R] change library path (for dummies)

2010-10-21 Thread clee
hi all, How can I change the library path in R? I don't have permission to write to the default R library on the computer I am running R on. I have searched the forum and have not found anything that I understand, so I apologize if this has been asked before. Thanks very much! -C -- View this

Re: [R] Calculating variances in a moving window

2010-10-21 Thread Mark Leeds
hi: use the fact that Var(x) = E(x^2) - E(x)^2 so that you can still use moments just like you did for the mean. On Thu, Oct 21, 2010 at 5:30 PM, Philippe Hensel wrote: > I am trying to create basic descriptive statistics for a spatial dataset > using moving windows of variable sizes. > > I foun

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread 1Rnwb
Thanks I agree i did not asked the question correctly, but I solved the issue using the suggestions from this post. http://www.mail-archive.com/r-h...@stat.math.ethz.ch/msg23646.html -- View this message in context: http://r.789695.n4.nabble.com/grep-tp3004422p3006236.html Sent from the R help

[R] Limitations and scale of R, and performance issues if and when limit reached

2010-10-21 Thread Stratos Laskarides
Hi there Thank you for everyone's help in all my previous questions. By way of intro, I am a masters student in actuarial science at the University of Cape Town, and I am doing a project in R on some healthcare cost data. Just for clarity before I embark on further research may I please ask the

Re: [R] Adding rows to column

2010-10-21 Thread 1Rnwb
sorry i got clik happy df2<-df1[, c(3,5,7,9,11,13,15)] df2<-df2[grep('ID', df2$Group), ] -- View this message in context: http://r.789695.n4.nabble.com/Adding-rows-to-column-tp3005607p3006302.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] exact pattern match in grep for column headers

2010-10-21 Thread 1Rnwb
the current code is like this vidx<-grep(paste('^',vars[vi],'$',sep=''),gsub("[[:punct:]]","",strrl1[[datbeg-1]]),ignore.case=T) where as the old one was vidx<-grep(vars[vi],gsub("[[:punct:]]","",strrl1[[datbeg-1]]),ignore.case=T) -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] Adding rows to column

2010-10-21 Thread 1Rnwb
If I understand correctly you want to create a new dataframe with selected columns which can be achieved this was as well, it will right away create a new dataframe with column headers df2<-df1[ ,c(3,7,9,11,13,15)] -- View this message in context: http://r.789695.n4.nabble.com/Adding-rows-to-c

Re: [R] change library path (for dummies)

2010-10-21 Thread Erik Iverson
?.libPaths clee wrote: hi all, How can I change the library path in R? I don't have permission to write to the default R library on the computer I am running R on. I have searched the forum and have not found anything that I understand, so I apologize if this has been asked before. Thanks ve

Re: [R] Calculating variances in a moving window

2010-10-21 Thread Gabor Grothendieck
On Thu, Oct 21, 2010 at 5:30 PM, Philippe Hensel wrote: > I am trying to create basic descriptive statistics for a spatial dataset > using moving windows of variable sizes. > > I found the filter(dataset, rep(1/a,1)) very useful for obtaining averages > for a given moving window size "a" > (a is t

[R] how do I make a correlation matrix positive definite?

2010-10-21 Thread HAKAN DEMIRTAS
Hi, If a matrix is not positive definite, make.positive.definite() function in corpcor library finds the nearest positive definite matrix by the method proposed by Higham (1988). However, when I deal with correlation matrices whose diagonals have to be 1 by definition, how do I do it? The abov

[R] Question about glmnet

2010-10-21 Thread Axel Urbiz
Hi, Is it possible to include factor variables as model inputs using this package? I'm quite sure it is not possible, but would like to double check. Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list http

  1   2   >