[R] Extreme Value Regression model

2010-07-15 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}} __

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

2010-07-15 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

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

2010-07-15 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

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

2010-07-15 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

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

2010-07-15 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] I can't figure out my plm model. Any ideas?

2010-07-15 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] Arrange values on a timeline

2010-07-15 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

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

2010-07-15 Thread Gábor Csárdi
On Thu, Jul 15, 2010 at 7:24 AM, chakri_amateur chakri2...@yahoo.co.in 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

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

2010-07-15 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

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

2010-07-15 Thread Hadley Wickham
For some reason package writers seem to prefer maximally uninformative names for their packages.  To take some examples of recently announced packages, can anyone guess what packages 'FDTH', 'rtv', or 'lavaan' do?  Why the aversion to informative names along the lines of

Re: [R] Error while connecting to Oracle using RODBC package

2010-07-15 Thread vikrant
Thanks Marc Daniel for your replies. I am now able to connect R to oracle using RODBS. There was an error while setting up the DSN. Now it is solved. Thanks once again -- View this message in context:

[R] scope of an argument in a function

2010-07-15 Thread Raghu
Hi I am trying to define a function fu() in the following way but when I try to run I get the error that ma1 is not found. I am not sure where I am going wrong? Does the scope of ma1 not extend to an expr.frame object? expr.frame() is under library tradesys. function (y,ma1,ma2) { x - y[,

Re: [R] SARIMA model

2010-07-15 Thread Allan Engelhardt
Try RSiteSearch(SARIMA) Allan On 13/07/10 14:15, FMH wrote: Dear All, Could someone please advice me the appropriate package for fitting the SARIMA model? Thanks Fir __ R-help@r-project.org mailing list

Re: [R] question regarding varImpPlot results vs. model$importance data on package RandomForest

2010-07-15 Thread Allan Engelhardt
Use the source, Luke. varImpPlot calls randomForest:::importance.randomForest (yeah, that is three colons) and reading about the scale= parameter in help(importance, package=randomForest) should enlighten you. For the impatient, try varImpPlot(mtcars.rf, scale=FALSE) Hope this helps a

Re: [R] question about SVM in e1071

2010-07-15 Thread Pau Carrio Gaspar
Hi Jack, to 1) and 2) there are telling you the same. I recommend you to read the first sections of the article it is very well writen and clear. There you will read about duality. to 3) I interpret the scatter plot so: * Increasing the value of C (...) forces the creation of a more accurate

[R] Warning message in summary of PGLM

2010-07-15 Thread Ana Navarrete, Anthropologisches Inst.
Dear Sir, When requesting the summary of pglm analyses in R, I encounter repeatedly the following warning message: Warning message: In pf(Fstat, object$k - 1, object$n - object$k, ncp = 0, lower.tail = FALSE, : full precision was not achieved in 'pnbeta' This message appears both with

Re: [R] Convergent series

2010-07-15 Thread Allan Engelhardt
Not 100% if this is what you are looking for, but maybe Reduce(+, x) will do it? E.g. Reduce(+, 1/2^(1:10)) # [1] 0.9990234 Hope this helps. Allan On 14/07/10 11:57, David Bickel wrote: What are some reliable R functions that can compute the value of a convergent series? David

Re: [R] force or assert interactive use with the --ess parameter in Windows

2010-07-15 Thread Daniel Sachse
That is quite sad. On 15.07.2010 10:12, Allan Engelhardt wrote: On 14/07/10 09:37, Daniel Sachse wrote: [...] I am seriously confused. Is there no such thing as R --persist MyScript.R myarg1 myarg2 that would run MyScript interactively? In a word: no. Depending on what you are really

Re: [R] Generate groups with random size but given total sample size

2010-07-15 Thread Arne Schulz
Hi, thanks a lot! That did it! Regards, Arne Schulz -Ursprüngliche Nachricht- Von: Greg Snow [mailto:greg.s...@imail.org] Gesendet: Dienstag, 13. Juli 2010 18:17 An: Arne Schulz; r-help@r-project.org Betreff: RE: [R] Generate groups with random size but given total sample size

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

2010-07-15 Thread Allan Engelhardt
The problem is that install.packages() and friends forks R and there is no way to specify general options to that process (you can do the configure.{args,vars} but nothing else). One work-around could be to download the package and install it with R --vanilla CMD INSTALL from the command

Re: [R] Matrix Size

2010-07-15 Thread Peter Dalgaard
paul s wrote: 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

[R] Scatterplot_row match

2010-07-15 Thread Yanwei Tan
Dear all, I would like to make a scatter plot using plot function. I have two sample 1c and 2c, the 1st and 3rd are the ID of each gene, the 2nd and 3rd are the values. But as you can see some genes are not in the same row, i.e: ENSMUSG0001020 is in the 4th row in sample 2c and 7th row

Re: [R] Warning message in summary of PGLM

2010-07-15 Thread Prof Brian Ripley
On Thu, 15 Jul 2010, Ana Navarrete, Anthropologisches Inst. wrote: Dear Sir, When requesting the summary of pglm analyses in R, I encounter repeatedly the following warning message: Warning message: In pf(Fstat, object$k - 1, object$n - object$k, ncp = 0, lower.tail = FALSE, : full

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

2010-07-15 Thread Govind Chandra
Thanks to Peter Konings, Peter Ehlers, Marc Schwartz and Peter Dalgaard my query has been satifactorily addressed. Govind __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Convergent series

2010-07-15 Thread Ted Harding
I don't think so -- as I understand it, what David is looking for is a method for taking a specification for the general term in a series (of indefinite length) and accumulating the sum of terms until a convergence criterion is satisfied -- see his Mathematica-inspired hypothetical example (in his

[R] Summing over intervals

2010-07-15 Thread steven mosher
Given a matrix of MxN want to take the means of rows in the following fashion m-matrix(seq(1,80),ncol=20, nrow=4) result-matrix(NA,nrow=4,ncol=20/5) result[,1]-apply(m[,1:5],1,mean) result[,2]-apply(m[,6:10],1,mean) result[,3]-apply(m[,11:15],1,mean) result[,4]-apply(m[,16:20],1,mean)

Re: [R] Summing over intervals

2010-07-15 Thread Tal Galili
You might find it useful to look at rollmean from the zoo package. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] Multilevel IRT Modelling

2010-07-15 Thread Federico Andreis
Thanks Stuart, I already had some of those papers, will check the others! best Federico On Wed, Jul 14, 2010 at 9:05 PM, Stuart Luppescu s...@ccsr.uchicago.eduwrote: On Wed, 2010-07-14 at 04:31 -0700, Dr. Federico Andreis wrote: does anybody know of a package (working under Linux) for

[R] qustion-binomial Ancova

2010-07-15 Thread רננה לביא
if I have binomial Ancova like: model-glm(y~treatment*x, binomial) summary(model) how should I understand the output? I want to know if I have interaction between the treatments and if the regression is significant? should I write: summary(aov(model)) or: summary(glm(model))? every summary give

Re: [R] scope of an argument in a function

2010-07-15 Thread Duncan Murdoch
On 15/07/2010 3:06 AM, Raghu wrote: Hi I am trying to define a function fu() in the following way but when I try to run I get the error that ma1 is not found. I am not sure where I am going wrong? Does the scope of ma1 not extend to an expr.frame object? expr.frame() is under library tradesys.

[R] Access web content from within R

2010-07-15 Thread Bart Joosen
Hi, I have to search in an online db for registered manufacturers of raw materials. Can I use R for the following: I have a list with monograph numbers eg: l - c(198, 731,355) Now I want to make a dataframe, containing the monograph number and the information listed under COS: Certificate

Re: [R] force or assert interactive use with the --ess parameter in Windows

2010-07-15 Thread Duncan Murdoch
On 15/07/2010 4:33 AM, Daniel Sachse wrote: That is quite sad. On 15.07.2010 10:12, Allan Engelhardt wrote: On 14/07/10 09:37, Daniel Sachse wrote: [...] I am seriously confused. Is there no such thing as R --persist MyScript.R myarg1 myarg2 that would run MyScript interactively? In a

Re: [R] Access web content from within R

2010-07-15 Thread Henrique Dallazuanna
Perhaps library RCurl. On Thu, Jul 15, 2010 at 7:36 AM, Bart Joosen bartjoo...@hotmail.com wrote: Hi, I have to search in an online db for registered manufacturers of raw materials. Can I use R for the following: I have a list with monograph numbers eg: l - c(198, 731,355) Now I want to

[R] pgmm error with lags higher than 2 in GMM instruments (package plm)

2010-07-15 Thread Ulrich Morawetz
Hello Giovanni, Hello Yves, Hello R-help-Readers, I re-run an old code of mine which uses the pgmm() function (and which used to work with an older versions) under plm version 1.2-4 and got the following error message Error in cbind(xd, td.model.diff) : number of rows of matrices must

[R] impute2mach GenABEL conversion problem

2010-07-15 Thread Newbie19_02
Hi, I've been trying to use the impute2mach function in the GenABEL library. I unfortunately cannot make a working example as when I scale down the files I no longer get an error message. The error message that I get on the full file is: Error in checkSlotAssignment(object, name, value) :

Re: [R] Extreme Value Regression model

2010-07-15 Thread Richardson, Patrick
Well, RSiteSearch(extreme value regression) turns up quite a few relevant posts including one on package XReg. . . for extreme value regression. Patrick -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Shubha Vishwanath Karanth

Re: [R] Summing over intervals

2010-07-15 Thread Eik Vettorazzi
Hi Steven, how about this (using simple matrix algebra) wind-5 #size of window to be aggregated if (ncol(m)%%wind!=0) stop('dimension of m does not fit') #crude check tmat-apply(diag(ncol(m)/wind),1,function(x)rep(x,each=wind))/wind m%*%tmat hth. Am 15.07.2010 11:39, schrieb steven mosher:

[R] Problem with offset (Glm or glmD) in Design library

2010-07-15 Thread Claus Dethlefsen / Region Nordjylland
Dear List My question relates to the rms (or Design) package. I have modified the example from help(Glm) to include an offset argument. It works with glm but Glm gives the error Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed # -- begin

[R] Backslash \ in string

2010-07-15 Thread Jannis
Dear R community, is there any way to include a backslash in a charakter string without meaning some escape sequence? E.g. i need a string like: a - '\hline' Error: '\h' is an unrecognized escape in character string starting \h to include some latex code in a xtable object, but I only mange

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

2010-07-15 Thread Ravi Varadhan
Let me quote the authority on naming convention: What's in a name? That which we call a rose by any other name would smell as sweet. Best, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and

Re: [R] Backslash \ in string

2010-07-15 Thread Erik Iverson
On 07/15/2010 08:02 AM, Jannis wrote: Dear R community, is there any way to include a backslash in a charakter string without meaning some escape sequence? E.g. i need a string like: a- '\hline' Error: '\h' is an unrecognized escape in character string starting \h to include some latex

Re: [R] Backslash \ in string

2010-07-15 Thread Jannis
Thanks for your reply Erik! You are right, it does not seem to matter. When the R string contains two \\, xtable prints it as only one \. I should have looked into the Latex output before posting! Thanks again, and sorry for posting too quick! Jannis --- Erik Iverson er...@ccbr.umn.edu

Re: [R] Access web content from within R

2010-07-15 Thread Uwe Ligges
On 15.07.2010 13:46, Henrique Dallazuanna wrote: Perhaps library RCurl. See fortune(distinction between 'library' and 'package') Uwe Ligges On Thu, Jul 15, 2010 at 7:36 AM, Bart Joosenbartjoo...@hotmail.com wrote: Hi, I have to search in an online db for registered manufacturers of

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

2010-07-15 Thread Uwe Ligges
On 14.07.2010 18:31, Ben Bolker wrote: Frédéric Holzwarthfrederic.holzwarthat 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

Re: [R] Extreme Value Regression model

2010-07-15 Thread Shubha Vishwanath Karanth
Thanks. But they don't speak of the extreme value distribution like Gumbel, Frechet or Weibull Thanks and Regards, Shubha Karanth | Amba Research Ph +91 80 3980 8435 | Mob +91 94 4886 4510 Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com  

Re: [R] qustion-binomial Ancova

2010-07-15 Thread Ben Bolker
רננה לביא renana.zeckbach at mail.huji.ac.il writes: if I have binomial Ancova like: model-glm(y~treatment*x, binomial) summary(model) how should I understand the output? I want to know if I have interaction between the treatments and if the regression is significant? should I write:

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

2010-07-15 Thread Hadley Wickham
For a quick fix, you probably need to reinstall plyr. Hadley On Wed, Jul 14, 2010 at 11:03 PM, stephen sefick ssef...@gmail.com wrote: 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

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

2010-07-15 Thread Millo Giovanni
Dear Salaam, if I ever get you right (and I'm not sure I do), you are confusing the residuals with the fixed effects. What you **would** probably be computing, if you used square brackets like in 0.59081533*ADOP[21]+0.04263590*PE[22]-0.03717528*WOR[22]+2.6 6677[22] (and amended

[R] Short survey concerning the use of software engineering in the field of High Performance Computing

2010-07-15 Thread Markus Schmidberger
Dear Colleagues, this is a short survey (21 questions that take about 10 minutes to answer) in context of the research work for my PhD thesis and the Munich Center of Advanced Computing (Project B2). It would be very helpful, if you will take the time to answer my questions concerning the use

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

2010-07-15 Thread Spencer Graves
Yes, but the choice of a name can substantively affect the marketing success of a new product. The current sos package started as the RSiteSearch package. I asked people for comments about the name. The consensus was that RSiteSearch was not a good name for that, and the universal distress

[R] RWinEdt and WinEdt 6.0

2010-07-15 Thread Christopher Desjardins
Hi, I am curious if the status of RWinEdt and WinEdt 6.0 has changed since this thread http://r.789695.n4.nabble.com/RWinEdt-in-WinEdt-6-td2174285.html Thanks for the help (especially Uwe Ligges for writing RWinEdt). Chris [[alternative HTML version deleted]]

[R] Creating Enumerated Variables

2010-07-15 Thread jdellava
Hi, I am trying to create a variable counting the number of individuals based on two variables. I am able to do it or one variable, but not two. In SAS I was able to sort by two variables and use a first. statement to create the counts based on both. Here is an example: What I have ID Age

[R] Error using the mi package

2010-07-15 Thread Andrew Miles
I'm trying to impute data using the mi package, but after running through almost the entire first round of imputations (which takes quite a while), it throws this error (I'll include the whole output prior to the error for context). Does anyone know what is causing it, or how I can fix

[R] CART with a circular response

2010-07-15 Thread Duarte Viana
Hello all, Could anyone advise me how can I implement classification and regression tree analyses for a circular response (angles)? Is there available R code or I would have to adapt code from rpart or tree libraries, which I am not sure would be able to do it? I would really appreciate any

Re: [R] randomForest outlier return NA

2010-07-15 Thread Liaw, Andy
There's a bug in the code. If you add row names to the X matrix befor you call randomForest(), you'd get: R summary (outlier(mdl.rf) ) Min. 1st Qu. MedianMean 3rd Qu.Max. -1.0580 -0.5957 0. 0.6406 1.2650 9.5200 I'll fix this in the next release. Thanks for reporting.

Re: [R] Extreme Value model

2010-07-15 Thread Terry Therneau
Just like a Poisson regression model, is there a package in R to do Extreme Value Regression model? Thanks. The survreg routine includes the extreme value distribution. It allows for cenored data, but the data can be uncensored. fit - survreg(Surv(y) ~ x1 + x2 + x3, dist='extreme') Terry

Re: [R] xyplot of function only shows diagonal plots

2010-07-15 Thread DrHatch
Ahh... That's how it works... embedding df - expand.grid(x=x,a=a,b=b) x - df$x; a - df$a; b - df$b gave the desired results. Thanks for helping a beginner. -Hc. Deepayan Sarkar wrote: . That you haven't created all the (a, b) combinations you want: you are plotting these combinations

Re: [R] Summing over intervals

2010-07-15 Thread Patrick J Rogers
Hi Steven, You can just cut the matrix up into a 5 column matrix and use apply as normal m2-matrix(as.vector(t(m)), ncol=5, byrow=TRUE) result-matrix(apply(m2, 1, mean), ncol=ncol(m)/ncol(m2), byrow=TRUE) result -- Patrick Rogers Dept. of Political Science University of California, San Diego

[R] Accessing packages

2010-07-15 Thread Paul Rheeder
Dear R I installed R2.11.1 on Windows XP and because of University access control I set the Cran and web passwords in the Rprofile.site file # set a CRAN mirror local({r - getOption(repos) r[CRAN] - http://cran.ru.ac.za/; options(repos=r)})

[R] write.csv() : attempt to set 'append' ignored... Why?

2010-07-15 Thread Cliff Clive
I'm running R 2.11.0 on a 32-bit Windows XP machine. Whenever I try to write a csv file with 'append' set to TRUE, I get this message: attempt to set 'append' ignored. Obviously, this is no good, since R is deleting my previously saved data files, rather than appending to them. What can I do

[R] Problem installing rJava under FreeBSD

2010-07-15 Thread Iñigo Ortiz de Urbina
Hi there I am setting up a FreeBSD server for my research department at university, and one of my teachers needs specifically R modules like tm, RWeka, rJava and the like. I have installed FreeBSD 8.0/i386 and applied the relevant security patches as well as the native FreeBSD JDK 1.6 with its

[R] Search and extract string function

2010-07-15 Thread AndrewPage
Hi all, I'm trying to write a function that will search and extract from a long character string, but with a twist: I want to use the characters before and the characters after what I want to extract as reference points. For example, say I'm working with data entries that looks like this:

[R] Send code to R from WinEdt55

2010-07-15 Thread YANG, Richard ChunHSi
R Gurus: This sounds not a FAQ. I upgraded WinEdt from 5.4 to 5.5 , following load RWinEdt, R-WinEdt editor appears. There are more menu items and task icons in this version, but I failed to find a pull down menu or task icon to send code to R. What did I miss? sessionInfo() R

Re: [R] Summing over intervals

2010-07-15 Thread steven mosher
Eik and Patrick, Thanks I will give those a try. On Thu, Jul 15, 2010 at 8:15 AM, Patrick J Rogers pjrog...@ucsd.edu wrote: Hi Steven, You can just cut the matrix up into a 5 column matrix and use apply as normal m2-matrix(as.vector(t(m)), ncol=5, byrow=TRUE) result-matrix(apply(m2, 1,

Re: [R] write.csv() : attempt to set 'append' ignored... Why?

2010-07-15 Thread Marc Schwartz
On Jul 15, 2010, at 9:41 AM, Cliff Clive wrote: I'm running R 2.11.0 on a 32-bit Windows XP machine. Whenever I try to write a csv file with 'append' set to TRUE, I get this message: attempt to set 'append' ignored. Obviously, this is no good, since R is deleting my previously saved data

[R] ERIM'10: Call for abstracts

2010-07-15 Thread Uwe Ligges
Dear useRs, we are organizing a track on Statistical Algorithms and Software at the 3rd International Conference of the ERCIM WG on COMPUTING STATISTICS (ERCIM'10) 10-12 December 2010, Senate House, University of London, UK http://www.cfe-csda.org/ercim10 Please consider giving a presentation

Re: [R] randomForest outlier return NA

2010-07-15 Thread Pau Carrio Gaspar
Hi Andy, thanks for your reply and your further correction. While the next release is not available I rewrite my code with your suggestion in case it might help anyone. ### library(randomForest) set.seed(0) ## build data set in data frame X - rbind( matrix(

Re: [R] Search and extract string function

2010-07-15 Thread Marc Schwartz
On Jul 15, 2010, at 9:48 AM, AndrewPage wrote: Hi all, I'm trying to write a function that will search and extract from a long character string, but with a twist: I want to use the characters before and the characters after what I want to extract as reference points. For example, say

Re: [R] Search and extract string function

2010-07-15 Thread Gabor Grothendieck
On Thu, Jul 15, 2010 at 10:48 AM, AndrewPage savejar...@yahoo.com wrote: Hi all, I'm trying to write a function that will search and extract from a long character string, but with a twist: I want to use the characters before and the characters after what I want to extract as reference

Re: [R] Scatterplot_row match

2010-07-15 Thread Jonathan Flowers
Hi, What if you create two data frames, then merge them by gene id. If your data is in a data frame called dframe... df1 - subset(dframe,select=c(id2c,2c)) df2 - subset(dframe,select=c(id1c,1c)) merged - merge(df1,df2,by.x=id2c,by.y=id1c,all=TRUE) plot(merged$1c,merged$2c) Cheers, Jonathan

[R] replace negative numbers by smallest positive value in matrix

2010-07-15 Thread Juliet Hannah
Hi Group, I have a matrix, and I would like to replace numbers less than 0 by the smallest minimum number. Below is an small matrix, and the loop I used. I would like to get suggestions on the R way to do this. Thanks, Juliet # example data set mymat - structure(c(-0.503183609420937,

Re: [R] replace negative numbers by smallest positive value in matrix

2010-07-15 Thread Jun Shen
Hi, Juliet, Something like this? mymat[mymat0]-min(mymat[mymat0]) Jun On Thu, Jul 15, 2010 at 10:55 AM, Juliet Hannah juliet.han...@gmail.com wrote: Hi Group, I have a matrix, and I would like to replace numbers less than 0 by the smallest minimum number. Below is an small matrix, and the

Re: [R] Matrix Size

2010-07-15 Thread paul s
On 07/15/2010 05:07 AM, Peter Dalgaard wrote: paul s wrote: 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,

Re: [R] Mathematica and R

2010-07-15 Thread David Bickel
Sage and Marc, thank you for your helpful replies. Since RLink enables R calls from Mathematica, I wonder if it would make the Mathematica Front End useful for organizing R work even if no Mathematica functions are needed. It would be nice R had something like the Front End, a GUI that

Re: [R] Scatterplot_row match

2010-07-15 Thread Yanwei Tan
Dear Jonathan, Thanks a lot for your help! That works pretty well! Best wishes, Wei On 7/15/10 5:52 PM, Jonathan Flowers wrote: Hi, What if you create two data frames, then merge them by gene id. If your data is in a data frame called dframe... df1 - subset(dframe,select=c(id2c,2c)) df2

Re: [R] replace negative numbers by smallest positive value in matrix

2010-07-15 Thread Phil Spector
Juliet - Since you're operating on each column, apply() would be the appropriate function; mymat = apply(mymat,2,function(x){x[x0] = min(x[x0]);x}) - Phil Spector Statistical Computing Facility

Re: [R] Creating Enumerated Variables

2010-07-15 Thread Wu Gong
If you only want a count, please try table text - ID Age School Grade 1 10 1 98 2 10 2 97 3 10 1 92 4 11 1 90 5 11 1 80 6 11 2 70 7 10 1 80 8 10 1 79 9 11 2 70 df - read.table(textConnection(text),header=T) table(df[,2:3]) If you want sort the data, try order. - A R learner. -- View this

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

2010-07-15 Thread Bert Gunter
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Hadley Wickham Sent: Thursday, July 15, 2010 12:15 AM To: Yves Rosseel Cc: r-help@r-project.org; richard_rauber...@merck.com Subject: Re: [R] [R-pkgs] New package list for analyzing

Re: [R] Mathematica and R

2010-07-15 Thread Erik Iverson
David Bickel wrote: Sage and Marc, thank you for your helpful replies. Since RLink enables R calls from Mathematica, I wonder if it would make the Mathematica Front End useful for organizing R work even if no Mathematica functions are needed. It would be nice R had something like the Front

Re: [R] Mathematica and R

2010-07-15 Thread Duncan Murdoch
On 15/07/2010 12:11 PM, David Bickel wrote: Sage and Marc, thank you for your helpful replies. Since RLink enables R calls from Mathematica, I wonder if it would make the Mathematica Front End useful for organizing R work even if no Mathematica functions are needed. It would be nice R had

Re: [R] replace negative numbers by smallest positive value in matrix

2010-07-15 Thread Juliet Hannah
Thanks Jun and Phil! On Thu, Jul 15, 2010 at 12:16 PM, Phil Spector spec...@stat.berkeley.edu wrote: Juliet -   Since you're operating on each column, apply() would be the appropriate function; mymat = apply(mymat,2,function(x){x[x0] = min(x[x0]);x})                                      

[R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread btc1
Hello, I have a vector, dates, as a series of 3 digit elements, i.e. date [1] 528 528 528 528 528 528 528 528 528 528 528 528 708 708 708 708 708 708 [19] 708 708 708 708 529 529 529 529 529 529 529 529 529 529 529 529 529 529 [37] 529 624 I need to convert them into julian, but have to

Re: [R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread Martyn Byng
Hi, Is this what you are looking for? a = c(528,528,528,528,708,708,529,1208,423,1506,321) paste(substr(a,1,nchar(a)-2),substr(a,nchar(a)-1,nchar(a)),sep=/) [1] 5/28 5/28 5/28 5/28 7/08 7/08 5/29 12/08 4/23 15/06 3/21 Martyn -Original Message- From:

[R] calling functions

2010-07-15 Thread louisey
Hello everyone!! I have written a function in R and need to call it more than once say M times then take an average of my output. How would I tell R to automatically call my function many times instead of just the once? Thanks! xxx -- View this message in context:

Re: [R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread Erik Iverson
btc1 wrote: Hello, I have a vector, dates, as a series of 3 digit elements, i.e. date [1] 528 528 528 528 528 528 528 528 528 528 528 528 708 708 708 708 708 708 [19] 708 708 708 708 529 529 529 529 529 529 529 529 529 529 529 529 529 529 [37] 529 624 I need to convert them into julian,

Re: [R] calling functions

2010-07-15 Thread Erik Iverson
louisey wrote: Hello everyone!! I have written a function in R and need to call it more than once say M times then take an average of my output. How would I tell R to automatically call my function many times instead of just the once? The natural way will depend on what you're trying to

Re: [R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread Wu Gong
gsub((.*)(.{2}),\\1/\\2,dates) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Cut-a-within-elements-by-length-not-value-of-vectors-tp2290440p2290471.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread Henrique Dallazuanna
Try this: gsub(^(.), \\1/, dates) On Thu, Jul 15, 2010 at 2:21 PM, btc1 btcaldw...@berkeley.edu wrote: Hello, I have a vector, dates, as a series of 3 digit elements, i.e. date [1] 528 528 528 528 528 528 528 528 528 528 528 528 708 708 708 708 708 708 [19] 708 708 708 708 529 529

Re: [R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread Nikhil Kaza
Building on Erik's solution and because it would easier to do date arithmetic.. d1 - as.character(date) d1 - ifelse(nchar(d1)4, paste(0,d1,sep=),d1) d2 - as.Date(date, %m%d) On Jul 15, 2010, at 1:21 PM, btc1 wrote: Hello, I have a vector, dates, as a series of 3 digit elements, i.e.

Re: [R] Cut a within elements by length, not value, of vectors

2010-07-15 Thread Benjamin Caldwell
Thanks all! That did it. On Thu, Jul 15, 2010 at 11:07 AM, Nikhil Kaza nikhil.l...@gmail.com wrote: Building on Erik's solution and because it would easier to do date arithmetic.. d1 - as.character(date) d1 - ifelse(nchar(d1)4, paste(0,d1,sep=),d1) d2 - as.Date(date, %m%d) On Jul 15,

[R] How do I combine lists of data.frames into a single data frame?

2010-07-15 Thread Ted Byers
The data.frame is constructed by one of the following functions: funweek - function(df) if (length(df$elapsed_time) 5) { rv = fitdist(df$elapsed_time,exp) rv$year = df$sale_year[1] rv$sample = df$sale_week[1] rv$granularity = week rv } funmonth - function(df) if

Re: [R] How do I combine lists of data.frames into a single data frame?

2010-07-15 Thread Marc Schwartz
On Jul 15, 2010, at 2:18 PM, Ted Byers wrote: The data.frame is constructed by one of the following functions: funweek - function(df) if (length(df$elapsed_time) 5) { rv = fitdist(df$elapsed_time,exp) rv$year = df$sale_year[1] rv$sample = df$sale_week[1] rv$granularity =

[R] How to delete a date frame from a data frame

2010-07-15 Thread Addi Wei
e.g. I have a big data set called combined, and then a small sample of combined called miceSample. I wish to delete miceSample from combined to create a new smaller data set and store it into a new object. combined - rbind(scaleMiceTrain, scaleMiceTest) miceSample -

[R] How to plot a histogram of weekday frequencies in a list of dates?

2010-07-15 Thread David Stark
Question from an [R] novice... Hi, I have a vector of date/times like the one shown below (a truncated sample of a much longer list...) dates[1:4] [1] 2006-03-16 08:41:00 2006-03-16 10:28:00 2006-03-16 11:03:00 [4] 2006-03-16 11:04:00 I would like to generate a weekday histogram showing the

Re: [R] write.csv() : attempt to set 'append' ignored... Why?

2010-07-15 Thread Jonathan Christensen
Out of curiosity, is this a change in 2.11? I'm still runnning 2.10.1, ?write.csv mentions the other options being ignored, but not append. This might also explain why John Kane believes he has successfully used append with write.csv in that past. Jonathan On Thu, Jul 15, 2010 at 9:36 AM, Marc

Re: [R] Search and extract string function

2010-07-15 Thread AndrewPage
Actually I have one more question that's somewhat related-- I'm starting out by importing a .txt file that isn't divided into vectors and is at times inconsistent with regards to spacing, indents, etc., so I can't rely on those. It looks something like this:

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

2010-07-15 Thread chakri_amateur
Dear Gabor Csardi, Thanks. The problem is now resolved. No wonder, writing computer programs is not just typing in random words and let the computer figure out what you are trying to do. At least not yet. Apart from typo errors like wri before write... and lecompose instead of decompose,

[R] local linear prediction

2010-07-15 Thread sebep
Hello everybody, I write my bachelor-work in statistic about Methods of nonlinear prediction in time series. I will apply the local linear point forecast (from Yao and Tong (1994a): Nonparametric method with the kernel function). I couldn`t find a appropriate package for this method. Have

Re: [R] write.csv() : attempt to set 'append' ignored... Why?

2010-07-15 Thread Jonathan Christensen
Never mind, I found the answer to my own question. From the 2.11.0 change log: owrite.csv[2] no longer allow 'append' to be changed: as ever, direct calls to write.table() give more flexibility as well as more room for error. Jonathan On Thu, Jul 15, 2010 at 2:01 PM, Jonathan

Re: [R] How do I combine lists of data.frames into a single data frame?

2010-07-15 Thread Ted Byers
Thanks Marc The next part of the question, though, involves the fact that there is a new 'z' list made in almost every iteration through the ID loop. I guess there are two parts to the question. First, how would I make a list containing all the data frames created by a call to rbind? I assume,

  1   2   >