[R] RODBC: data base with decimal point ","

2010-10-21 Thread RINNER Heinrich
Dear R-users, I am working with R version 2.10.1 and package RODBC Version: 1.3-2 under windows. Say I have a table "testtable" (in an Access data base) with 3 columns and 1 row that looks like this: X Y Z 0012345 42 42,1 The columns are of these types: X - character, Y

[R] Random Forest AUC

2010-10-21 Thread vioravis
Guys, I used Random Forest with a couple of data sets I had to predict for binary response. In all the cases, the AUC of the training set is coming to be 1. Is this always the case with random forests? Can someone please clarify this? I have given a simple example, first using logistic regressi

Re: [R] visualize TukeyHSD results

2010-10-21 Thread Spencer Graves
install.packages('sos' ) # if you do not have it already library(sos) hsd <- ???TukeyHSD # 27 matches summary(hsd) # in 12 packages hsd # open the results in a browser. # Note especially the second package multcompView # The multcomp package with 2 matches has a companion book # Frank Bretz, Torst

[R] visualize TukeyHSD results

2010-10-21 Thread Timothy Spier
I am a new R user but a long time SAS user. I searched for a response to this question but no luck, so forgive me if this topic has been covered before. I am running a TukeyHSD post hoc test after running an ANOVA. I get the results of all pairwise comparisons, no problem. However, the output t

Re: [R] problem on using read.csv function

2010-10-21 Thread jim holtman
An example would be useful. Look at what is causing what you think are numbers to be interpreted as character strings and therefore being changed to numbers. For example, are there commas in the numbers, are some missing and replaced by some character sequence that represents missing values. You

[R] Help: Maximum likelihood estimation

2010-10-21 Thread roach
I was trying to reproduce a result in a published journal, and I have come across some difficulties. I have the following equation, which is two equations combined together. http://r.789695.n4.nabble.com/file/n3006584/Screenshot.png where http://r.789695.n4.nabble.com/file/n3006584/Screenshot-1.p

Re: [R] problem on using read.csv function

2010-10-21 Thread Joshua Wiley
Hi Sonia, This suggests that those columns have something in them that is not numeric (e.g., "." to represent missing data, text, etc.). You can avoid them being converted to factor using: read.csv("yourfile.csv", stringsAsFactors = FALSE) however, they will still be character class, not numeri

[R] problem on using read.csv function

2010-10-21 Thread mou sonia
Hi, I'm using read.csv to import a table. But sevel columns are changed to factor variables automatically. They are actually numbers not factor levels. Why this happened? How can I get the correct table? Thanks a lot. Sonia [[alternative HTML version deleted]] __

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

2010-10-21 Thread Peter Langfelder
On Thu, Oct 21, 2010 at 3:50 PM, HAKAN DEMIRTAS wrote: > 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 w

Re: [R] trouble with \textless in Hmisc latex() on a drop1 object

2010-10-21 Thread Duncan Murdoch
On 21/10/2010 9:21 PM, Christopher W Ryan wrote: Yes, it's homework . . . delete now if desired . . . but I think it is an interesting problem. Looks like a simple bug in Hmisc, leaving out that space. I'd grab a copy of the source, fix it, and send a patch to the maintainer (Charles Dupont

[R] trouble with \textless in Hmisc latex() on a drop1 object

2010-10-21 Thread Christopher W Ryan
Yes, it's homework . . . delete now if desired . . . but I think it is an interesting problem. Running R 2.11.1, LaTeX on WinXP, via Sweave. A drop1() object from a glm() produces, as part of its output, a string that looks like this: The trouble I run into is that running latex() on a drop1(

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

2010-10-21 Thread Spencer Graves
Using "complete.observations" could produce a correlation matrix based on zero data or on less than 1 percent of available data. Have you considered "missMDA: a new package to handle missing values in PCA or MCA with FactoMineR" (http://factominer.free.fr)? If the data are

Re: [R] Conversion of S+ libraries

2010-10-21 Thread Bill.Venables
It would certainly not be straightforward, unless Tibco has done a lot of work to make it possible in recent years, (which is not unlikely). They have done a lot of work in the other direction, i.e. enabling R packages to be used within S-PLUS. S-PLUS has the concept of a "chapter", which roug

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

2010-10-21 Thread Steve Lianoglou
Hi, On Thu, Oct 21, 2010 at 12:12 PM, Martin Tomko wrote: > 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 differ

Re: [R] Package for GLMM with correlation matrix

2010-10-21 Thread Ben Bolker
wong gmail.com> writes: > I'm looking for a R package for fitting a generalized linear mixed model > g(E[yi])=â*xi+ui > where g is a link function, subscript i represents the individual id, â is > fixed effect coefficient, ui is a random effect with E[u]=0 and covariance > Cov[u]=G*ó^2, in wh

[R] Package for GLMM with correlation matrix

2010-10-21 Thread wong
Hi, I'm looking for a R package for fitting a generalized linear mixed model g(E[yi])=â*xi+ui where g is a link function, subscript i represents the individual id, â is fixed effect coefficient, ui is a random effect with E[u]=0 and covariance Cov[u]=G*ó^2, in which G is a correlation matrix.

Re: [R] RandomForest Proximity Matrix

2010-10-21 Thread Liaw, Andy
From: 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

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

2010-10-21 Thread Jeremy Miles
Let me rephrase the answer. :) Correlation matrices are a kind of covariance matrix, where all of the variances are equal to 1.00. >From what I understand of make.positive.definite() [which is very little], it (effectively) treats the matrix as a covariance matrix, and finds a matrix which is pos

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

2010-10-21 Thread HAKAN DEMIRTAS
I know. Let me re-phrase the question: How do I convert a non-positive definite correlation matrix to a positive-definite correlation matrix in R? I don't think cov2cor is relevant here. Example: print(corr.mat) [,1] [,2] [,3] [,4] [1,] 1.00 -0.95 -0.28 -0.64 [2,] -0.95 1.00 -0

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

2010-10-21 Thread Jeremy Miles
You could use cov2cor() to convert from covariance matrix to correlation matrix. If the correlation is >1, the matrix won't be positive definite, so you can restandardize the matrix to get a pos def correlation matrix. Jeremy On 21 October 2010 15:50, HAKAN DEMIRTAS wrote: > Hi, > > If a matri

[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

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

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] 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] 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
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. ___

[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] 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

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

[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

[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] 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:

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,

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
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 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 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

[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] 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

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,

[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] 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

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] 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] 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 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] 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)

[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] 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

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] 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

[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] 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] 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

[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] 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

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

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] 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] 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

[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] 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

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 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 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] 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

[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] 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] 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] 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

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] 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
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] 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] 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] 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] 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] 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

[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] 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

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] 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] 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] 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] 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

[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

[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

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] 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.

[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

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] 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] 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

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] 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] 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] 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] 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] 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

  1   2   >