Re: [R] [R-pkgs] New package "list" for analyzing list surveyexperiments

2010-07-14 Thread Allan Engelhardt
On 13/07/10 19:16, Erik Iverson wrote: Raubertas, Richard wrote: I agree that 'list' is a terrible package name, but only secondarily because it is a data type. The primary problem is that it is so generic as to be almost totally uninformative about what the package does. For some reason pack

Re: [R] send out put to file in R

2010-07-14 Thread Gábor Csárdi
On Thu, Jul 15, 2010 at 7:24 AM, chakri_amateur wrote: [...] > wri write.graph ("F://new", "pajek") <-      decompose.graph(g,  mode="weak", > max.comps=NA, > min.vertices= 20) > > > But even that doesn't work No wonder, writing computer programs is not just typing in random words and let the co

Re: [R] Arrange values on a timeline

2010-07-14 Thread Remko Duursma
Try this: a <- data.frame(timestamp=c(3,5,8), mylabel=c("abc","def","ghi")) b <- data.frame(timestamp=c(1:10)) txt <- as.character(a$mylabel) nrepeat <- diff(c(a$timestamp,nrow(b))) b$mylabel <- c( rep(NA, a$timestamp[1]), rep(txt, diff(c(a$timestamp,nrow(b ) greetings, Remko --

[R] I can't figure out my plm model. Any ideas?

2010-07-14 Thread Salaam Batur
Dear R users, I am using plm packege in R to build my model, but from the result I can't quite figure out what it is... Can anyone tell me why? Am I missing something? R Results: *> ar1<-plm(formula=ADOP~lag(ADOP,1)+PE+WOR, + data=well, effect="time",model="within") > summary(ar1)* Oneway (time

Re: [R] send out put to file in R

2010-07-14 Thread chakri_amateur
Dear Peter Ehlers, Thanks. In decompose help page of 'R' It's clearly mentioned that the output of decompose command is a separate graph for each component . It is true that, Variable in which  I stored my output is not a graph object. I tried the following command also - To directly save

[R] Histogram with two groups on the same graph (not on separate panels)

2010-07-14 Thread Kiyoshi Sasaki
I have been trying to produce a histogram that has two groups (male and female snakes) on the same graph (either superimposed or each frequency bar appears side by side). I found a couple of functions for superimposed histogram written by other people. The below is the codes I used for my data c

[R] RMySQL Load Error: package/namespace load failed for 'RMySQL'

2010-07-14 Thread neatgadgets
Hi, I am brand new to the world of R, so please bare with me while I goof my way through a question. I am attempting to trial using R with MySQL. The MySQL server is on a Linux box and I am using the Windows (32bit XP) version of R. I have installed RMySQL successfully, however when I load it

Re: [R] RMySQL Load Error: package/namespace load failed for 'RMySQL'

2010-07-14 Thread asbro
Ok that was quick, I found the problem. I put a bin folder in and copied the dll from above that folder and put it in. HOWEVER: Now I get this error: Error : .onLoad failed in loadNamespace() for 'RMySQL', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load

[R] Extreme Value Regression model

2010-07-14 Thread Shubha Vishwanath Karanth
Hi R, Just like a Poisson regression model, is there a package in R to do Extreme Value Regression model? Thanks. Thanks and Regards, Shubha Karanth This e-mail may contain confidential and/or privileged i...{{dropped:13}} __ R-help@r-pro

Re: [R] taking daily means from hourly data

2010-07-14 Thread Meissner, Tony (DFW)
Thanks Alan and Gabor. Alan’s code appears to be the simplest to run and Gabor provided some further insight. Tschüß Tony Meissner Principal Scientist (Monitoring) Resources Monitoring Group Science, Monitoring and Information Division Department for Water "Imagine" © •(ph) (08) 8595 220

Re: [R] taking daily means from hourly data

2010-07-14 Thread Allan Engelhardt
This is one way: df<- data.frame(Time=as.POSIXct("2009-01-01", format="%Y-%m-%d") + seq(0, 60*60*24*365-1, 60*60), lev.morgan=3+runif(24*365), lev.lock2=3+runif(24*365), flow=1000+rnorm(24*365, 200), direction=runif(24*365, 0

Re: [R] taking daily means from hourly data

2010-07-14 Thread Gabor Grothendieck
On Thu, Jul 15, 2010 at 12:52 AM, Meissner, Tony (DFW) wrote: > I have a data frame (morgan) of hourly river flow, river levels and wind > direction and speed thus: >         Time           hour lev.morgan lev.lock2 lev.lock1 flow   direction   > velocity > 1  2009-07-06 15:00:00   15      3.266

[R] Longitudinal negative binomial regression - robust sandwich estimator standard errors

2010-07-14 Thread Matt Cooper
Hi All, I have a dataset, longitudinal in nature, each row is a 'visit' to a clinic, which has numerous data fields and a count variable for the number of 'events' that occurred since the previous visit. ~50k rows, ~2k unique subjects so ~25 rows/visits per subject, some have 50 some have 3 or 4

[R] taking daily means from hourly data

2010-07-14 Thread Meissner, Tony (DFW)
I have a data frame (morgan) of hourly river flow, river levels and wind direction and speed thus: Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity 1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6 180.282 4.352 2 2009-07-06 16:00:00

[R] acf significance levels

2010-07-14 Thread nuncio m
Dear useRs, How to save the correlations corresponding to the significance levels from ACF function Thanks nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML version dele

[R] R2wd and ESS: printing source?

2010-07-14 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm using R2wd and ESS. ESS-mode doesn't let one fill wdBody() calls, and printing out of Emacs (M-x print-buffer or M-x print-region) doesn't wrap, so I miss most of the text on printed listings. What do others do to address that? Thanks, Bill - -

[R] Longitudinal negative binomial regression - robust sandwich estimator standard errors

2010-07-14 Thread nzcoops
Hi All, I have a dataset, longitudinal in nature, each row is a 'visit' to a clinic, which has numerous data fields and a count variable for the number of 'events' that occurred since the previous visit. ~50k rows, ~2k unique subjects so ~25 rows/visits per subject, some have 50 some have 3 or

Re: [R] Cannot Build R From Source - Windows XP

2010-07-14 Thread Steve Pederson
Thanks for the help. That sorted it out straight away. Duncan Murdoch wrote: On 14/07/2010 12:01 PM, Steve Pederson wrote: Hi, I can't seem to install R from source. I've downloaded the latest Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ & done a full installation of that and

Re: [R] Question about food sampling analysis

2010-07-14 Thread kMan
Dear Sarah, [snip...] "I know that samples within each facility cannot be treated as independent, so I need an approach that accounts for (1) clustering within facilities and" You could just use lm() & some planning. The data from within a specific facility can be fit with a model to generate par

Re: [R] R's Data Dredging Philosophy for Distribution Fitting

2010-07-14 Thread Ben Bolker
emorway engr.colostate.edu> writes: > > > Forum, > > I'm a grad student in Civil Eng, took some Stats classes that required > students learn R, and I have since taken to R and use it for as much as I > can. Back in my lab/office, many of my fellow grad students still use > proprietary softwa

Re: [R] R's Data Dredging Philosophy for Distribution Fitting

2010-07-14 Thread Frank E Harrell Jr
On 07/14/2010 06:22 PM, emorway wrote: Forum, I'm a grad student in Civil Eng, took some Stats classes that required students learn R, and I have since taken to R and use it for as much as I can. Back in my lab/office, many of my fellow grad students still use proprietary software at the behes

Re: [R] Matrix Size

2010-07-14 Thread Christos Argyropoulos
If the system is sparse and you have a really large cluster to play with, then maybe (emphasis) PETSc/TAO is the right combination of tools for your problem. http://www.mcs.anl.gov/petsc/petsc-as/ Christos

Re: [R] export tables to excel files on multiple sheets with titles for each table

2010-07-14 Thread Whit Armstrong
It isn't beautiful, but I use this package to write excel files from linux. http://github.com/armstrtw/Rexcelpoi the basic idea is that each element of a list is written as a separate sheet, but if a list element is itself a list, then all the elements of that list are written to the same sheet (

Re: [R] Matrix Size

2010-07-14 Thread paul s
On 07/14/2010 07:07 PM, Duncan Murdoch wrote: It is capable of handling large data, but not that large in a single matrix. The limit on the number of entries in any vector (and matrices are stored as vectors) is about 2^31 ~ 2 billion. Your matrix needs about 340 billion entries, so it's too big.

Re: [R] Matrix Size

2010-07-14 Thread paul s
On 07/14/2010 06:10 PM, Douglas Bates wrote: R stores matrices and other data objects in memory. A matrix of that size would require 2e+06*17*8/2^30 [1] 2533.197 great, that is my understanding as well.. probably easier, rethink your problem. yes. i am starting to do that now as i ha

Re: [R] Matrix Size

2010-07-14 Thread paul s
On 07/14/2010 06:15 PM, Peter Dalgaard wrote: A quick calculation reveals that a matrix of that size requires about 2.7 TERAbytes of storage, so I'm a bit confused as to how you might expect to fit it into 16GB of RAM... However, even with terabytes of memory, you would be running into the (cu

[R] R's Data Dredging Philosophy for Distribution Fitting

2010-07-14 Thread emorway
Forum, I'm a grad student in Civil Eng, took some Stats classes that required students learn R, and I have since taken to R and use it for as much as I can. Back in my lab/office, many of my fellow grad students still use proprietary software at the behest of advisers who are familiar with the

Re: [R] Matrix Size

2010-07-14 Thread Duncan Murdoch
On 14/07/2010 5:23 PM, paul s wrote: hi - i just started using R as i am trying to figure out how perform a linear regression on a huge matrix. i am sure this topic has passed through the email list before but could not find anything in the archives. i have a matrix that is 2,000,000 x 170

Re: [R] export tables to excel files on multiple sheets with titles for each table

2010-07-14 Thread Erich Neuwirth
You also could use RExcel and write some VBA macros doing this task for you. You can essentially have the rcom R-centric solution or the VBA-centric RExcel solution. On Jul 14, 2010, at 12:19 AM, Marc Schwartz wrote: > If I am correctly understanding what Eugen is trying to do, WriteXLS() won't

Re: [R] Matrix Size

2010-07-14 Thread Peter Dalgaard
paul s wrote: > hi - > > i just started using R as i am trying to figure out how perform a linear > regression on a huge matrix. > > i am sure this topic has passed through the email list before but could > not find anything in the archives. > > i have a matrix that is 2,000,000 x 170,000 the

Re: [R] Matrix Size

2010-07-14 Thread Douglas Bates
On Wed, Jul 14, 2010 at 4:23 PM, paul s wrote: > hi - > i just started using R as i am trying to figure out how perform a linear > regression on a huge matrix. > i am sure this topic has passed through the email list before but could not > find anything in the archives. > i have a matrix that i

Re: [R] How to see the process of function sample()?

2010-07-14 Thread Peter Dalgaard
Wu Gong wrote: > I have the same question about how to see the process behind a function. If I > type sample in R, it really tells nothing about how R selects from a data > set and creates samples. > > Thank in advance for any help. > > - > A R learner. Uwe Ligges. R Help Desk: Accessing th

[R] How to see the process of function sample()?

2010-07-14 Thread Wu Gong
I have the same question about how to see the process behind a function. If I type sample in R, it really tells nothing about how R selects from a data set and creates samples. Thank in advance for any help. - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/How

Re: [R] Merging columns along time line

2010-07-14 Thread Wu Gong
Correction: b$label <- cut(b$timestamp, breaks=bks, labels=lbs, include.lowest = T, right=F) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Merging-columns-along-time-line-tp2289147p2289401.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Matrix Size

2010-07-14 Thread paul s
hi - i just started using R as i am trying to figure out how perform a linear regression on a huge matrix. i am sure this topic has passed through the email list before but could not find anything in the archives. i have a matrix that is 2,000,000 x 170,000 the values right now are arbitra

[R] .Rprofile interfering with update.packages()

2010-07-14 Thread stephen sefick
I know this is a double post, but the subject line was really misleading. Sorry again. This is the first time that I have tried to update packages with a tinkered around with .Rprofile. I start R with R --vanilla and it does not load my .Rprofile, but when I issue the command update.packages() R

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Peter Dalgaard
Marc Schwartz wrote: > You need to understand the difference between how a value is stored > in an R object with full floating point precision versus how a value > in R is displayed (printed) in the console with a print "method". > > In this case, wilcox.test() returns an object of class 'htest' (

Re: [R] rows process in DF

2010-07-14 Thread Phil Spector
If you don't mind avoiding a loop, here's one way to solve your problem: myDF = data.frame(id=c(100,101),d1=c(.3,.3),d2=c(.4,.4),d3=c(-.2,.5),d4=c(-.3,.6),d5=c(.5,-.2),d6=c(.6,-.4),d7=c(-.9,-.5),d8=c(-.8,-.6)) doit = function(x)c(x[1],sum_positive=sum(x[-1][x[-1]>0]),sum_negative=sum(x[-1][x[-

Re: [R] Merging columns along time line

2010-07-14 Thread Wu Gong
I take this case as cut a data set by breaks and assign each segment a label name. a <- data.frame(timestamp=c(3,5,8), mylabel=c("abc","def","ghi")) b <- data.frame(timestamp=c(1:10)) bks <- c(a$timestamp,max(b$timestamp)) lbs <- a$mylabel b$label <- cut(b$timestamp, breaks=bks, labels=lbs, inclu

Re: [R] How to see inside of this function?

2010-07-14 Thread Erik Iverson
Bogaso Christofer wrote: Hi, there is a function Skewness() under fBasics package. If I type "skewness", I get followings: Case matters in R, so please be precise. skewness function (x, ...) { UseMethod("skewness") } Would be great if someone tell me how to see the co

[R] qplot in ggplot2 not working any longer - (what did I do?)

2010-07-14 Thread stephen sefick
This is the first time that I have tried to update packages with a tinkered around with .Rprofile. I start R with R --vanilla and it does not load my .Rprofile, but when I issue the command update.packages() R downloads the packages as expected, but then seems to load .Rprofile before compiling th

[R] rows process in DF

2010-07-14 Thread jd6688
I have the following datasets: id d1 d2 d3 d4 d5 d6 d7 d8 1 100 0.3 0.4 -0.2 -0.3 0.5 0.6 -0.9 -0.8 2 101 0.3 0.4 0.5 0.6 -0.2 -0.4 -0.5 -0.6 what I am trying to accomplish: loop through the rows && do the following: if the values from the columns of the current row >0

[R] How to see inside of this function?

2010-07-14 Thread Bogaso Christofer
Hi, there is a function Skewness() under fBasics package. If I type "skewness", I get followings: > skewness function (x, ...) { UseMethod("skewness") } Would be great if someone tell me how to see the codes of this function. 2ndly suppose I create following function: fn1

Re: [R] Boxplot: Scale outliers

2010-07-14 Thread Peter Ehlers
On 2010-07-13 12:11, Robert Peter wrote: Hello! I am trying to scale the outliers in a boxplot. I am passing "pars = list(boxwex=0.1, staplewex=0.1, outwex=0.1)" to the boxplot command. The boxes are scaled correctly, but the circles (outliers) are not scaled at all, and thus pretty big compared

Re: [R] Import graph object

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 3:19 PM, Michael Haenlein wrote: > Dear all, > > I have a txt file of the following format that describes the relationships > between a network of a certain number of nodes. > > {4, 2, 3} > {3, 4, 1} > {4, 2, 1} > {2, 1, 3} > {2, 3} > {} > {2, 5, 1} > {3, 5, 4} > {3, 4} > {2,

Re: [R] Import graph object

2010-07-14 Thread Duncan Murdoch
On 14/07/2010 4:19 PM, Michael Haenlein wrote: Dear all, I have a txt file of the following format that describes the relationships between a network of a certain number of nodes. {4, 2, 3} {3, 4, 1} {4, 2, 1} {2, 1, 3} {2, 3} {} {2, 5, 1} {3, 5, 4} {3, 4} {2, 5, 3} For example the first line

Re: [R] question about string handling....

2010-07-14 Thread Henrique Dallazuanna
Another option could be: df$var3 <- gsub(".*\\((.*)\\).*", "\\1", df$var2) On Wed, Jul 14, 2010 at 3:21 PM, karena wrote: > > Hi, > > I have a data.frame as following: > var1 var2 > 1 ab_c_(ok) > 2 okf789(db)_c > 3 jojfiod(90).gt > 4 "ij"_(78)__op

[R] Import graph object

2010-07-14 Thread Michael Haenlein
Dear all, I have a txt file of the following format that describes the relationships between a network of a certain number of nodes. {4, 2, 3} {3, 4, 1} {4, 2, 1} {2, 1, 3} {2, 3} {} {2, 5, 1} {3, 5, 4} {3, 4} {2, 5, 3} For example the first line {4, 2, 3} implies that there is a connection betw

Re: [R] question about string handling....

2010-07-14 Thread Wu Gong
Try this: text <- 'var1 var2 1 ab_c_(ok) 2 okf789(db)_c 3 jojfiod(90).gt 4 "ij"_(78)__op 5 (iojfodjfo)_ab' df <- read.table(textConnection(text), head=T, sep=" ",quote="") df$var3 <- gsub("(.*\\()(.*)(\\).*)","\\2",df$var2) - A R learner. -- View this message in context: http://r.789695.

Re: [R] question about string handling....

2010-07-14 Thread Gabor Grothendieck
On Wed, Jul 14, 2010 at 2:21 PM, karena wrote: > > Hi, > > I have a data.frame as following: > var1         var2 > 1           ab_c_(ok) > 2           okf789(db)_c > 3           jojfiod(90).gt > 4           "ij"_(78)__op > 5           (iojfodjfo)_ab > > what I want is to create a new variable call

[R] question about string handling....

2010-07-14 Thread karena
Hi, I have a data.frame as following: var1 var2 1 ab_c_(ok) 2 okf789(db)_c 3 jojfiod(90).gt 4 "ij"_(78)__op 5 (iojfodjfo)_ab what I want is to create a new variable called "var3". the value of var3 is the content in the Parentheses. so v

Re: [R] Add Significance Codes to Data Frame

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 2:16 PM, darckeen wrote: > > I was hoping that there might be some way to attach significance code like > the ones from summary.lm to a dataframe. Anyone know how to do something > like that. Here is the function i'd like to add that functionality to: > > > add1.coef <- fu

[R] fGarch: garchFit() with fixed coefficents

2010-07-14 Thread georger2
hello everybody, I would like to fit a model to a times series (testing set) for out of sample predictions using garchFit(). I would like to keep the coefficients of ARMA/GARCH model fixed (as found by fitting the model to my training set). The arima fitting function has such an option for that

Re: [R] [R-pkgs] New package "list" for analyzing list surveyexperiments

2010-07-14 Thread Yves Rosseel
On 07/13/2010 07:46 PM, Raubertas, Richard wrote: I agree that 'list' is a terrible package name, but only secondarily because it is a data type. The primary problem is that it is so generic as to be almost totally uninformative about what the package does. For some reason package writers seem

Re: [R] What is the opposite of rbind?

2010-07-14 Thread schuster
On Wednesday 14 July 2010 09:06:01 pm Addi Wei wrote: > I combined 2 data frames together using rbind... How do I unbind the data > at a specific row to create 2 separate data frames? > if you have a column with an identifier: try split() Example: split(iris, iris$Species) -- Friedri

Re: [R] calling a c function from R

2010-07-14 Thread Fahim Md
Thanks a lot Matt, Just if someone like to see how I called a C function from R with files as argumets. For simplicity, this example is copying the content of input file into output file - My main program is : source("parse.R") parseGBest('gbest40.se

Re: [R] Embedding graphics in a pdf()

2010-07-14 Thread Thomas Levine
Woah! That's so awesome! And now I've found even more functions of my drawing programs that can be replaced with R. Tom 2010/7/14 Marc Schwartz > On Jul 14, 2010, at 1:38 PM, Thomas Levine wrote: > > > I've had two reasons for wanting to embed graphics in R pdf output. > > > > 1. I am plotting

[R] Add Significance Codes to Data Frame

2010-07-14 Thread darckeen
I was hoping that there might be some way to attach significance code like the ones from summary.lm to a dataframe. Anyone know how to do something like that. Here is the function i'd like to add that functionality to: add1.coef <- function(model,scope,test="F",p.value=1,order.by.p=FALSE) {

Re: [R] What is the opposite of rbind?

2010-07-14 Thread RICHARD M. HEIBERGER
a <- rbind(1:3, 4:6, 7:9, 10:12, 13:15) a1 <- a[1:3,] a2 <- a[4:5,] a1 a2 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

[R] What is the opposite of rbind?

2010-07-14 Thread Addi Wei
I combined 2 data frames together using rbind... How do I unbind the data at a specific row to create 2 separate data frames? -- View this message in context: http://r.789695.n4.nabble.com/What-is-the-opposite-of-rbind-tp2289244p2289244.html Sent from the R help mailing list archive at Nabble

Re: [R] Multilevel IRT Modelling

2010-07-14 Thread Stuart Luppescu
On Wed, 2010-07-14 at 04:31 -0700, Dr. Federico Andreis wrote: > does anybody know of a package (working under Linux) for multilevel > IRT modelling? > I'd love to do this without having to go on WINSTEPS or the like.. The first place to look would be the special issue of the Journal of Statistica

[R] Java Heap Space Error while running kpca command

2010-07-14 Thread Patrick J Rogers
Hi All, I'm trying to run a kernel principal component analysis on a corpus with 89769 text documents. I'm using the kpca command from the kernlab package. Here is the code: output<-kpca(text, kernel=worddot(type="spectrum", length=1)) The problem is that when I run the kpca, it bails

Re: [R] Printing status updates in while-loop

2010-07-14 Thread jim holtman
try: print(counter) flush.console() # force the output On Wed, Jul 14, 2010 at 2:31 PM, Michael Haenlein wrote: > Dear all, > > I'm using a while loop in the context of an iterative optimization > procedure. Within my while loop I have a counter variable that helps me to > determine how long th

Re: [R] Embedding graphics in a pdf()

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 1:38 PM, Thomas Levine wrote: > I've had two reasons for wanting to embed graphics in R pdf output. > > 1. I am plotting something on top of a surface (It's actually a desk.) of > which I have a picture and would like to place a picture underneath. > 2. I can produce all of my

Re: [R] Write value to PHP webpage

2010-07-14 Thread Wu Gong
I suggest trying to write the data into .php file directly. outfile <-paste(filepath,"distance",".php",sep="") data <- "Distance=num" num <- 1000 data <- sub("num", num,data) write(data,file=outfile) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Write-val

[R] Embedding graphics in a pdf()

2010-07-14 Thread Thomas Levine
I've had two reasons for wanting to embed graphics in R pdf output. 1. I am plotting something on top of a surface (It's actually a desk.) of which I have a picture and would like to place a picture underneath. 2. I can produce all of my presentation slides in R without LaTeX but have a few pictur

[R] Printing status updates in while-loop

2010-07-14 Thread Michael Haenlein
Dear all, I'm using a while loop in the context of an iterative optimization procedure. Within my while loop I have a counter variable that helps me to determine how long the loop has been running. Before the loop I initialize it as counter <- 0 and the last condition within my loop is counter <-

[R] Pointers to solutions to this PCA or Cononical Correlation type problem?

2010-07-14 Thread LosemindL
Hi all, I am sure this is a well-studied stats problem, could anybody give me some pointers? It's similar to Canonical Correlation study. We have a bunch of random variables, and want to figure out the set of linear combinations of these variables, such that their mutual correlations are all bo

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Addi Wei
Maybe I'm missing something, but after reading the reshape package, I'm still not quite sure how reshaping the data will help me with storing the previously used samples and preventing me from selecting previously used samples in the future. This is my pseudo code thought process, but I'm not s

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread T.D. Rudolph
sample(data, 3, replace=FALSE)[,-1:2] or sample(data, 3, replace=FALSE)[,-c("id","pID50")] Tyler On Wed, Jul 14, 2010 at 1:17 PM, Addi Wei [via R] < ml-node+2289092-1912443153-77...@n4.nabble.com > wrote: > id pID50 apol a_acca_acid a_aro a_base a_count > 1 mol.11 3.63

Re: [R] Using which function with xts

2010-07-14 Thread Wu Gong
Correction: data[abs(data$price-avg)<=3*std,] - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Using-which-function-with-xts-tp226p2289166.html Sent from the R help mailing list archive at Nabble.com. __ R-help

Re: [R] Using which function with xts

2010-07-14 Thread Wu Gong
Let's say your "data" has 2 columns: one is "date" and another is "price", then avg = mean(data$price, na.rm=T) std = sd(data$price, na.rm=T) The data after those unwanted removed should be: data[data$price-avg<=3*std,] - A R learner. -- View this message in context: http://r.789695.n4.n

Re: [R] count - help

2010-07-14 Thread Dieter Menne
barbara horta e costa wrote: > > > Sample Season Area Gear Depth >1 W 1 5 1 >2 Sp 1 3 1 >2 Sp 1 5 1 >2 Sp 1 11 1 >

Re: [R] count - help

2010-07-14 Thread Dieter Menne
-- View this message in context: http://r.789695.n4.nabble.com/count-help-tp2288571p2289156.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Merging columns along time line

2010-07-14 Thread Ralf B
I am resending this, as I believe it has not arrived on the mailing list when I first emailed. I have a set of labels arranged along a timeframe in a. Each label has a timestamp and marks a state until the next label. The dataframe a contains 5 such timestamps and 5 associated labels. This means,

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Jeff Newmiller
I would use "melt" from the reshape package so that "sample" could be used, rather than trying to process various selections of columns from a wide data.frame. "Addi Wei" wrote: > >Sorry to post multiple questions, but this is still related to the sample >function. > >In my previous example, h

Re: [R] long to wide on larger data set

2010-07-14 Thread Juliet Hannah
Hi Matthew and Jim, Thanks for all the suggestions as always. Matthew's post was very informative in showing how things can be done much more efficiently with data.table. I haven't had a chance to finish the reshaping because my group was a in rush, and someone else decided to do it in Perl. Howev

[R] Dot Plot with Confidence Limits

2010-07-14 Thread Neil123
Hi, I have the following dataset and I would like to create a dotplot with confidence limits: CAT1 CAT2 MEAN Lower Upper 1 1 10.619 0.392 0.845 2 1

[R] BaselR meeting July 2010

2010-07-14 Thread Sarah Lewis
Good afternoon, Mango Solutions AG (Switzerland) is proud to announce the forthcoming BaselR meeting. Thank you to everyone who supported our inaugural BaselR meeting on April 28th; we were fortunate to have three excellent presentations which prompted lively discussion - our thanks go to And

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Addi Wei
Sorry to post multiple questions, but this is still related to the sample function. In my previous example, how do I save/store the current sample so when I run sample again (after analysis) I can exclude the samples that were previously chosen. For example if I have 180 factors or columns...an

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Joshua Wiley
On Wed, Jul 14, 2010 at 10:24 AM, Federico Andreis wrote: > I guess you could just use as an argument to sample > > data[,-c(1,2)] > > where 1 and 2 are id and pID50 column number or if you do not know them and do not want to find out: sample(data[ , - match(c("id", "x3"), names(data))], 3, repl

Re: [R] question about SVM in e1071

2010-07-14 Thread Jack Luo
Pau, Thanks a lot for your email, I found it very helpful. Please see below for my reply, thanks. -Jack On Wed, Jul 14, 2010 at 10:36 AM, Pau Carrio Gaspar wrote: > Hello Jack, > > 1 ) why do you thought that " larger C is prone to overfitting than smaller > C" ? > *There is some statement

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Federico Andreis
I guess you could just use as an argument to sample data[,-c(1,2)] where 1 and 2 are id and pID50 column number On Wed, Jul 14, 2010 at 7:17 PM, Addi Wei wrote: > > id pID50 apol a_acca_acid a_aro a_base a_count > 1 mol.11 3.63 -0.882267 -0.527967 -0.298197 -1.032380

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Addi Wei
id pID50 apol a_acca_acid a_aro a_base a_count 1 mol.11 3.63 -0.882267 -0.527967 -0.298197 -1.032380 0 -1.063410 2 mol.14 3.38 -1.007330 -0.527967 -0.298197 -1.032380 0 -1.063410 3 mol.19 3.18 1.153560 1.407910 -0.298197 1.254100 0 1.160080 4 mol.20

Re: [R] a very particular plot

2010-07-14 Thread Ista Zahn
Hi all, Maybe I missed some crucial context (I did not follow the example all the way through). But of course ggplot will make legends based on integers. For example: dat <- data.frame(x=sample(1:10, 100, replace=TRUE), y=sample(1:10, 100, replace=TRUE), z=sampl

Re: [R] Cannot Build R From Source - Windows XP

2010-07-14 Thread Duncan Murdoch
On 14/07/2010 12:01 PM, Steve Pederson wrote: Hi, I can't seem to install R from source. I've downloaded the latest Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ & done a full installation of that and Inno Setup. I have set R_HOME as C:\R (and also tried using C:\R\R-2.11.1)

[R] Estimating a differential equation parameters based on a data set

2010-07-14 Thread Oscar Rodriguez
Hello R community: Here is another question, How can I estimate a differential equation parameters based on a data set? If you know where I can find some examples will be better, Thanks again, and cheers, Oscar Rodriguez Gonzalez Mobile: 519.823.3409 PhD Student Canadian Resear

Re: [R] convert data.frame to matrix -> NA factor problem

2010-07-14 Thread Erik Iverson
syrvn wrote: Thanks again for your quick reply. I understood your procedure but now it is even more strange why my conversion does not work. In your example, the NA values are in "brackets" and what your procedure does is to convert these values into NA and then it seems to be possible to us

[R] problem of loading workspace

2010-07-14 Thread Yan Jiao
I'm using R x64 2.11.0(windows) I was trying to load workspace I saved some days ago, but got the error: ReadItem: unknown type 63, perhaps written by later version of R. Has anyone come across the same problem? Any solutions? Many thanks yan *

Re: [R] ver 2.11.1 from xterm on Mac without lme4

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 10:17 AM, Andrea Foulkes wrote: > Hi, > > I just installed version 2.11.1 on my Mac OS X 10.5.2. When I try running R > from my xterm, I get the following error: > > Error in loadNamespace(name) : there is no package called 'lme4' > Fatal error: unable to restore saved data

Re: [R] how to update a bugs-model from inside R using R2WinBUGS

2010-07-14 Thread Ben Bolker
Frédéric Holzwarth uni-leipzig.de> writes: > > Hello there, > > is there a way to update a model, which was called by "bugs()"? For > instance starting with few iterations and then updating more and more, > as is possible inside the WinBUGS-window. If set "debug=TRUE", then the > window rema

Re: [R] Win Server x64/R: Memory Allocation Problem

2010-07-14 Thread Dirk Eddelbuettel
On Wed, Jul 14, 2010 at 05:51:17PM +0200, will.ea...@gmx.net wrote: > Dear all, > > how can I use R on a 64-bit Windows Server 2003 machine (24GB RAM) with more > than 3GB of working memory and make full use of it. > > I started R --max-mem-size=3G since I got the warning that larger values are

Re: [R] convert data.frame to matrix -> NA factor problem

2010-07-14 Thread syrvn
Thanks again for your quick reply. I understood your procedure but now it is even more strange why my conversion does not work. In your example, the NA values are in "brackets" and what your procedure does is to convert these values into NA and then it seems to be possible to use data.matrix to

Re: [R] ver 2.11.1 from xterm on Mac without lme4

2010-07-14 Thread Faisal Moledina
On Wed, Jul 14, 2010 at 11:17 AM, Andrea Foulkes wrote: > Hi, > > I just installed version 2.11.1 on my Mac OS X 10.5.2. When I try running R > from my xterm, I get the following error: > > Error in loadNamespace(name) : there is no package called 'lme4' > Fatal error: unable to restore saved data

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Marc Schwartz
You need to understand the difference between how a value is stored in an R object with full floating point precision versus how a value in R is displayed (printed) in the console with a print "method". In this case, wilcox.test() returns an object of class 'htest' (as noted in the Value sectio

[R] Cannot Build R From Source - Windows XP

2010-07-14 Thread Steve Pederson
Hi, I can't seem to install R from source. I've downloaded the latest Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ & done a full installation of that and Inno Setup. I have set R_HOME as C:\R (and also tried using C:\R\R-2.11.1) After successfully running 'tar xf R-2.11.1.tar

Re: [R] convert data.frame to matrix -> NA factor problem

2010-07-14 Thread Joshua Wiley
More importantly than just that they are factors, NA is actually a level of X3. If it was a factor column, but NA was not a level, than in the conversion to numeric, it would not change into a 4, but it is a level (in fact the 4th level), so it becomes a 4. From ?factor here is the recommended wa

[R] Win Server x64/R: Memory Allocation Problem

2010-07-14 Thread will . eagle
Dear all, how can I use R on a 64-bit Windows Server 2003 machine (24GB RAM) with more than 3GB of working memory and make full use of it. I started R --max-mem-size=3G since I got the warning that larger values are too large and ignored. In R I got: > memory.size(max=FALSE) [1] 10.5 > memory

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Govind Chandra
Hi Peter, Thanks for your response. Yes, I am interested in P-values smaller than 1e-16. Below a certain value they may not tell much about significance but are useful for ordering (ranking), for example, differentially expressed genes in microarray data. Something similar is done by sequence sim

Re: [R] [R-pkgs] New package "list" for analyzing list surveyexperiments

2010-07-14 Thread Jeffrey J. Hallman
Well, as the author of two CRAN packages with short names (tis and fame), I maintain that short names can be fairly informative. The fame package is an interface to FAME time series databases, and the tis package implements the tis (TimeIndexedSeries) class and support classes that it needs. When

  1   2   >