[R] how to use node info generated by rpart in mars?

2010-03-23 Thread vibha patel
I am working on rpart, mars and earth. they all work fine individually. but i want to use node information generated by rpart in earth or mars. (mars is sensitive to outliers. CART deals effectively with outliers.) is there any way to perform this? Thanks. [[alternative HTML version

Re: [R] Error while trying to save summary() output as csv

2010-03-23 Thread Kamil Sijko
Thank you David, thank you Ista - as.matrix solves the problem. Best regards, Kamil Sijko +48.790.818.212 2010/3/22 David Winsemius dwinsem...@comcast.net: On Mar 22, 2010, at 3:06 PM, Ista Zahn wrote: Hi Kamil, You can use something like write.csv(t(as.matrix(object)), file=name.csv)

[R] package precedence question

2010-03-23 Thread step...@mnemosyne.co.uk
Dear R help I am writing a package where I am intending to extend the png function of the grDevices package. When I load my package, my png function indeed substitutes the grDevices function, and everything seems OK. I am a little confused though at how function precedence is determined. I am

[R] Problem installing package

2010-03-23 Thread Craig Woodward
Dear r-help users, I have just downloaded the package vegan and I have problems accessing the data to go through the examples in the tutorial. I can see the data when I type data() but I am told that the data doesn't exist when I type the name of one of the variables e.g.: varespec Error:

[R] If else statements

2010-03-23 Thread tj
Hi everyone! May I request again for your help? I need to make some codes using if else statements... Can I do an if-else statement inside an if-else statement? Is this the correct form of writing it? Thank you.=) Example: for (v in 1:6) { for (i in 2:200) { if (v==1) (if max(x*v-y*v)1

Re: [R] R script From PHP

2010-03-23 Thread sanchow
Hello, I am having the same problem. My webmaster is not ready to install R on the web server. Is there a way to run R on a remote linux cluster and POST results from the remote server to my website? I am sorry if this is more of a PHP question. Thank you and Any help appreciated. S -- View

[R] how to use node info generated by rpart in mars?

2010-03-23 Thread vibha patel
I am working on rpart, mars and earth. they all work fine individually. but i want to use node information generated by rpart in earth or mars. (mars is sensitive to outliers. CART deals effectively with outliers.) is there any way to perform this? Thanks. [[alternative HTML version

[R] Linear Discriminant Analysis

2010-03-23 Thread L L
Hi, I was wondering if you can show me how to plot the discriminant boundary lines for an LD analysis in R. I am curious as to perform this on a larger scale, so I was wondering if you can provide me an example on the infamous 'iris' data. Here's what I have so far: iris.lda=lda(Species ~.,

[R] Author R books- Packt Publishing.

2010-03-23 Thread Kshipra Singh
Hi All, I am writing to you for Packt Publishing, the publishers of computer related books. We are planning to extend our catalogue of books based on Scientific Computing Tools and are currently inviting authors interested in writing for Packt. This doesn't need any previous writing

[R] printing text within if functions inside a for loop

2010-03-23 Thread Tian Pan
Hi I am having a problem with outputting text inside an if function. I have the following code: for (j in 20:length(bb.up)) { if (up[j]==1 up[j-1]==0) { sprintf(Long on %s at a price of %f,dates[j],data[j]) } if (down[j]==1 down[j-1]==0) { sprintf(Short on %s at a price of

Re: [R] printing text within if functions inside a for loop

2010-03-23 Thread Mario Valle
Use: cat(sprintf(Long on %s at a price of %f\n,dates[j],data[j])) Hope it helps mario Tian Pan wrote: Hi I am having a problem with outputting text inside an if function. I have the following code: for (j in 20:length(bb.up)) { if (up[j]==1 up[j-1]==0) {

Re: [R] maxNR - Error in p(a, b) : element 1 is empty; the part of the args list of '*' being evaluated was: (b, t)

2010-03-23 Thread Arne Henningsen
On 22 March 2010 16:31, 4-real danielkjae...@gmail.com wrote: Hello everyone... We were trying to implement the Newton-Raphson method in R, and estimate the parameters a and b, of a function, F, however we can't seem to implement this the right way. Hope you can show me the right way to do

Re: [R] R script From PHP

2010-03-23 Thread Romain Francois
Hello, You might like the php client to Rserve that is part of the next version of Rserve. see http://www.rforge.net/Rserve/svn.html install the last snapshot, and check the client/php/simple.php file If you decide to go this way, then I'd suggest you use the stats-rosuda-devel mailing

[R] Log linear model - Showing non-deviation form in glm()

2010-03-23 Thread Christoffer Karlsson
Hey, Whenever I set up a log linear model using glm(Y~. , data=data, family=poisson) I get the parameters in the form of deviation from the first cell kombination. I find this to be hard to interpret when I for instance want to know if there is a difference between two factors in the first

[R] S4: Multiple inheritance

2010-03-23 Thread Christophe Genolini
Hi all, Working with S4 object, I definine two class foo1 and foo2. I define '[' (resp. '[-') for the two classes. Then I define a third class foo3 that inherit from both foo1 and foo2. Is there a way to make '[' (resp. '[-') for foo3 inherit from '[' (resp. '[-') for foo1 and foo2? Thanks

[R] Changing content of column in data.frame + efficient join extraction between 2 data.frames

2010-03-23 Thread Corrado
Dear R users, I have 2 SpatialPointsDataFrame's, pcs and East. The column str_1 in the first (pcs) is: pcs[0:4,] coordinates cat str_1 int_1 int_2dbl_1 dbl_2 1 (101000, 263000) 1 SM06B 101000 263000 4.978915 -4.293668 2 (101000, 265000) 2 SM06C 101000 265000 4.960478

Re: [R] S4: Multiple inheritance

2010-03-23 Thread Corrado
Dear Christophe, Could you please post some example code of what you are trying to achieve? Christophe Genolini wrote: Hi all, Working with S4 object, I definine two class foo1 and foo2. I define '[' (resp. '[-') for the two classes. Then I define a third class foo3 that inherit from both

[R] help with survival package

2010-03-23 Thread Shankavaram, Uma (NIH/NCI) [E]
I am trying use survfit function in survival package, but getting an error that Error in survfit: could not find function survfit.km This package was working fine previously. I am using R version 2.9.2 on Windows. Can anyone tell me if this is a bug in the function code or something is

Re: [R] Changing content of column in data.frame + efficient join extraction between 2 data.frames

2010-03-23 Thread Bernardo Rangel Tura
On Tue, 2010-03-23 at 09:37 +, Corrado wrote: Dear R users, I have 2 SpatialPointsDataFrame's, pcs and East. The column str_1 in the first (pcs) is: pcs[0:4,] coordinates cat str_1 int_1 int_2dbl_1 dbl_2 1 (101000, 263000) 1 SM06B 101000 263000 4.978915

[R] Extracting all members with a specific similarity value from a large similarity matrix

2010-03-23 Thread Buergmann, Helmut
I have a large dataframe (1400x1400) containing a symmetric similarity matrix. Now I would like to extract subsets of elements where all elements have a specific similarity with all other elements of this subset. For example if the data looks like this Spl1Spl2Spl3Spl4

[R] help

2010-03-23 Thread fredrick devadoss
Hello All, I am new to R and tried to install R in Linux system (OS: Open SUSE). After untar the source code, changed the directory, and typed the command ./configure, it was checking a list...finally it gave an error message. Here with i have enclosed the error message. Check-list goes like

Re: [R] help

2010-03-23 Thread Ista Zahn
Hi Fredrick, Is there a reason you need to compile the source code? If not, I recommend following the instillation instructions on CRAN. OpenSuse instructions are at http://cran.r-project.org/bin/linux/suse/ Best, Ista On Tue, Mar 23, 2010 at 7:43 AM, fredrick devadoss fredrick_i...@yahoo.com

Re: [R] Mosaic plots

2010-03-23 Thread Jay Emerson
As pointed out by others, vcd supports mosaic plots on top of the grid engine (which is extremely helpful for those of us who love playing around with grid). The standard mosaicplot() function is directly available (it isn't clear if you knew this). The proper display of names is a real

[R] rdcomclient issue - member not found when using borders

2010-03-23 Thread Jason Baucom
I wrote a procedure to create a spreadsheet using rdcomclient. It uses a function to do the writing and runs correctly in isolation. It gives errors, but it continues to completion. The error I receive is Error: Member not found. If I place it inside a for loop the loop fails after the first

Re: [R] If else statements

2010-03-23 Thread Matthew Dowle
Here are some references. Please read these first and post again if you are still stuck after reading them. If you do post again, we will need x and y. 1. Introduction to R : 9.2.1 Conditional execution: if statements. 2. R Language Definition : 3.2 Control structures. 3. R for beginners by E

Re: [R] Problem installing package

2010-03-23 Thread David Winsemius
The inner components of object are not accessible by name. You need to use the proper functions to retrieve or modify them. You are asked by the PostingGuide to show your code and be more specific about problems. Until you do so, that is about all anyone will be able to say about your

[R] caret package, how can I deal with RFE+SVM wrong message?

2010-03-23 Thread bbslover
Hello, I am learning caret package, and I want to use the RFE to reduce the feature. I want to use RFE coupled Random Forest (RFE+FR) to complete this task. As we know, there are a number of pre-defined sets of functions, like random Forest(rfFuncs), however,I want to tune the parameters

[R] Transform data set

2010-03-23 Thread Thomas Jensen
Dear R Experts, I am having some trouble creating a variable in R. I have data on self-placement of voters, their placement of parties, and which party they feel closest to. The data is structured like this: Party_Closelrplaceself lrplaceParty1 lrplaceParty2 ... party1

[R] information module Wilks' lambda criterion

2010-03-23 Thread Catherine ENG
Hi everybody, I was wondering if you can help me about a module. In fact, I'm looking for a package or module about Wilks' lambda criterion in R environment. I didn't find it in R website ( http://cran.cict.fr/web/packages/index.html#available-packages-W or http://search.cpan.org/faq.html). If

Re: [R] estimation of parameters with grofit

2010-03-23 Thread alexander russell
Hello again about grofit: I've been looking at the grofit explanatory pdf, but it seems to me that it's missing a little bit of commentary as to the multiplicity of 'experiments'. For example, what is the minimum number of data points(not time points) to obtain a model? Would it be similar to the

Re: [R] Embed R code in C++

2010-03-23 Thread mans
No, I didnt install Rcpp but i have R 2.10.1 already installed. What's the difference with Rinside and Rcpp? Do i need both to embed R code in C++ file or just one of them ? Could you tell me where can i get Rcpp pkg? How can i Install it because i dont know how to compile a source file on the

[R] R-installation regarding.

2010-03-23 Thread fredrick devadoss
Hello All, I am new to R and tried to install R in Linux system (OS: Open SUSE). After untar the source code, changed the directory, and typed the command ./configure, it was checking a list...finally it gave an error message. Here with i have enclosed the error message. Check-list goes like

Re: [R] Calling R functions into C# or C++

2010-03-23 Thread ManInMoon
Fayssal, This zip file appears to be corrupted - do you have another version? -- View this message in context: http://n4.nabble.com/Calling-R-functions-into-C-or-C-tp904267p1679002.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Transform data set

2010-03-23 Thread stephen sefick
I am not entirely sure what you are trying to do. Are you wanting to re-arrange the columns or apply some sort of transformation? On Tue, Mar 23, 2010 at 4:47 AM, Thomas Jensen thomas.jen...@eup.gess.ethz.ch wrote: Dear R Experts, I am having some trouble creating a variable in R. I have data

Re: [R] help with survival package

2010-03-23 Thread Shankavaram, Uma (NIH/NCI) [E]
I am trying use survfit function in survival package, but getting an error that Error in survfit: could not find function survfit.km This package was working fine previously. I am using R version 2.9.2 on Windows. Can anyone tell me if this is a bug in the function code or something is

Re: [R] Transform data set

2010-03-23 Thread Wincent
Looks like this way, dat$lrplacepartyclose - NA dat$lrplacepartyclose[dat$Party_Close==party1] - dat$lrplaceParty1[dat$Party_Close==party1] dat$lrplacepartyclose[dat$Party_Close==party2] - dat$lrplaceParty2[dat$Party_Close==party2] and goes on and on. On 23 March 2010 17:47, Thomas Jensen

Re: [R] help with survival package

2010-03-23 Thread David Winsemius
On Mar 23, 2010, at 6:13 AM, Shankavaram, Uma (NIH/NCI) [E] wrote: I am trying use survfit function in survival package, but getting an error that Error in survfit: could not find function survfit.km This package was working fine previously. I am using R version 2.9.2 on Windows. If

Re: [R] R-installation regarding.

2010-03-23 Thread Paul Hiemstra
Hi Frederick, The development files for readline are not available. Install them to get this working. For debian/ubuntu the package to install is called libreadline-dev or something. SUSE's package manager might have a similar package. Alternatively you can skip installing R from source and

Re: [R] Embed R code in C++

2010-03-23 Thread Romain Francois
Le 23/03/10 13:34, mans a écrit : No, I didnt install Rcpp but i have R 2.10.1 already installed. If you want to use RInside, you need Rcpp. This is what dependencies are for. you can install Rcpp from R : install.packages( Rcpp ) What's the difference with Rinside and Rcpp? Rcpp

Re: [R] If else statements

2010-03-23 Thread tj
Thanks Matthew... I will read your suggested articles/files. I hope, i will be able to figure out what should be done with this. =) ~tj -- View this message in context: http://n4.nabble.com/If-else-statements-tp1678705p1679073.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] If else statements

2010-03-23 Thread R Help
The short answer is yes, you can, but your syntax is wrong. You need to make sure you wrap your conditions inside brackets, and use {, not (, to delineate your if statements. for (v in 1:6) { for (i in 2:200) { if (v==1){ if (max(x*v-y*v)1) break() } } } et cetera On Tue, Mar

[R] Converting date format

2010-03-23 Thread Hosack, Michael
R community: Hello, I would to like to convert a character date variable from %m/%d/%Y to %m/%d/%y. Any advice would be greatly appreciated. I have tried functions for changing the formatting and removing the unnecessary digits without success. Mike

[R] no predict function in lme4 ?

2010-03-23 Thread Markus Loecher
Dear mixed effects modelers, I seem unable to find a predict method for mer objects in the package lme4. Am I not seeing the forest for the trees ? Any pointer would be very helpful. Thanks, Markus [[alternative HTML version deleted]] __

Re: [R] Converting date format

2010-03-23 Thread Nutter, Benjamin
If x is your vector of character date variables: orig.date - as.Date(x, format=c(%m/%d/%Y)) new.date - format(x, format=c(%m/%d/%y)) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Hosack, Michael Sent: Tuesday, March 23, 2010

[R] Solutions for memory problems (packages ff, bigmemory)?

2010-03-23 Thread hhafner
Hello, I want to impute missing values using the package mi. My file has around 28 MB (50.000 observations, 120 variables). My computer is a Windows XP 32-bit machine, 4 GB Duo Core processor. When I run mi, already after some minutes during iteration 1, I get the message that a vector

[R] multi-stage sampling and hierarchical models: which packages?

2010-03-23 Thread Steve Powell
Dear wizaRds, I have a dataset to analyse which is causing me problems. It is a sample of parents in schools. First we had a population table of the schools in the country in question divided into five regions, and in each region we have an urban/rural split. The population Ns in these ten cells

[R] glmpath and coxpath variables

2010-03-23 Thread Antoni Picornell
Hi, I am analyzing a set of variables in order to create a survival model for a set of patients. I have checked the reference manual for glm path and coxpath in order to achieve it. However I have a doubt about the class of the covariates I can use with the last mentioned package. In the

[R] using a list to index elements of a list

2010-03-23 Thread Pj253
I have a list of vectors, x, with x[[1]]=1:5, say. And I need to go through each element of each vector in a for loop. Something like: for (v in x[[1]]) print(v) However, I need to store this index v for later, and I have lots of other indices which we range over later in the code so thought

Re: [R] using a list to index elements of a list

2010-03-23 Thread Benilton Carvalho
if this was to work, wouldn't the object 'v' be identical to 'x'?... so, why not use 'x' itself? b On Tue, Mar 23, 2010 at 2:53 PM, Pj253 pj...@cam.ac.uk wrote: I have a list of vectors, x, with x[[1]]=1:5, say. And I need to go through each element of each vector in a for loop. Something

Re: [R] using a list to index elements of a list

2010-03-23 Thread Pj253
Thanks for your reply Ben! I don't think I want v to be identical to x... I guess I haven't put the question in the right context. What I'm actually trying to do is... (* indicates extra information, not necessarily relevant for my question, but to help put it in context) A, some matrix (*a

Re: [R] using a list to index elements of a list

2010-03-23 Thread Benilton Carvalho
can you also post an example of A and an example of the expected result? On Tue, Mar 23, 2010 at 3:36 PM, Pj253 pj...@cam.ac.uk wrote: Thanks for your reply Ben! I don't think I want v to be identical to x... I guess I haven't put the question in the right context. What I'm actually trying

Re: [R] If else statements

2010-03-23 Thread tj
Thanks Sam for the short but very helpful answer. That's what I only want to know. Thanks.=) ~tj -- View this message in context: http://n4.nabble.com/If-else-statements-tp1678705p1679187.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML

Re: [R] using a list to index elements of a list

2010-03-23 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Pj253 Sent: Tuesday, March 23, 2010 7:54 AM To: r-help@r-project.org Subject: [R] using a list to index elements of a list I have a list of vectors, x, with x[[1]]=1:5, say.

Re: [R] Converting date format

2010-03-23 Thread jim holtman
try this: x - c('1/1/1970','12/13/2010', '2/3/2001') gsub((\\d+/\\d+/)\\d\\d(\\d\\d file://d+///d+/)//d//d(//d//d), \\1\\2file://0.0.0.1//2, x) [1] 1/1/70 12/13/10 2/3/01 On Tue, Mar 23, 2010 at 10:10 AM, Hosack, Michael mhos...@state.pa.uswrote: R community: Hello, I would to like to

[R] barplot (stacked)

2010-03-23 Thread koj
Dear all, I want to draw a barplot with the following data: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 110.0675 118.4167 117.16 109.735416 101.6312 104.0312 101.8263 99.38541670 114.2613 [2,] 0. 0. 0.00 1.658333 0.

Re: [R] caret package, how can I deal with RFE+SVM wrong message?

2010-03-23 Thread Max Kuhn
Kevin! I've sent 5 replies to your questions already off-list. The first question is easy (see below). The others will need more information on your data (via str(trx) abd str(try)) and you versions (sessionInfo()) as previously asked off-list. Sorry to out you, but this is bad form. Max I

[R] Sample size for proportion, not binomial

2010-03-23 Thread Prew, Paul
Hello, I am looking for a sample size function for samples sizes, to test proportions that are not binomial proportions. The proportions represent a ratio of (final measure) / (baseline measure) on the same experimental unit. Searches using RSeek and such bring multiple hits for binomial

Re: [R] using a list to index elements of a list

2010-03-23 Thread Pj253
Thanks Bill, that sorted it out! And thank you too Ben! Bill and Ben. Are you familiar with the flowerpot men by any chance!? Thanks again! -- View this message in context: http://n4.nabble.com/using-a-list-to-index-elements-of-a-list-tp1679184p1679293.html Sent from the R help mailing list

Re: [R] using a list to index elements of a list

2010-03-23 Thread Benilton Carvalho
and in addition to bill's suggestion, you may want to consider not growing a list. Instead of 'v - list()', use: v - vector(list, nrow(A)) b Will your code work as you wish if you replace the for(v[[1]] in x[[1]]) { ... } with the following?   for(i in x[[1]]) {      v[[2]] - i      ...

Re: [R] filled.contour formatting questions

2010-03-23 Thread John K. Williams
Hmm yes that is what I'm looking for in terms of color scale control, but I need it for contoured plots. John. On Mon, Mar 22, 2010 at 10:32 PM, Jim Lemon j...@bitwrit.com.au wrote: On 03/23/2010 12:48 PM, John K. Williams wrote: Hello, I'm having some trouble getting things to look as I

Re: [R] Changing global variables from functions

2010-03-23 Thread jtouyz
Thanks for the help, I've fixed the problem. -Josh Elliott -- View this message in context: http://n4.nabble.com/Changing-global-variables-from-functions-tp1595002p1679330.html Sent from the R help mailing list archive at Nabble.com. __

[R] Optim() Help, Unusual Error

2010-03-23 Thread ApproxGaussian
Hello all, any help with the following would be appreciated. I am attempting to maximize 28 parameters similtaneously in Optim(). The follwoing is my code: Y-comp[,9] n-length(Y) e.1-.5 e.2-.5 e.3-.5 e.4-.5 e.5-.5 e.6-.5 e.7-.5 e.8-.5 e.9-.5 e.10-.5 e.11-.5 e.12-.5 e.13-.5 e.14-.5 e.15-.5

[R] R Participation in the Google Summer of Code 2010

2010-03-23 Thread Dirk Eddelbuettel
Dear R Users, We would like to highlight that R has once again been selected to participate in the Google Summer of Code. Suggested projects can be found in the R-Wiki: http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2010. The GSoC is a program from Google that offers student

[R] qplot(ggplo2): axis label sizes/colors

2010-03-23 Thread milton ruser
Dear all, How can I change the size and the color of axis? I would like that the xlab to be larger, xvalues to be larger, and xvalues in black instead of grey. x=runif(10) y=runif(10) require(ggplo2) qplot(x,y) cheers milton [[alternative HTML version deleted]]

Re: [R] qplot(ggplo2): axis label sizes/colors

2010-03-23 Thread Xie Chao
http://had.co.nz/stat405/lectures/21-themes.pdf On Wed, Mar 24, 2010 at 1:22 AM, milton ruser milton.ru...@gmail.com wrote: Dear all, How can I change the size and the color of axis? I would like that the xlab to be larger, xvalues to be larger, and xvalues in black instead of grey.

[R] Displaying equations from .Rd files

2010-03-23 Thread AC Del Re
Hi All, I am reading through section 2.6 (Mathematics) of the Writing R Extensions manuscript and am wondering where I can find more examples/documentation on the \deqn{ } function. I would like to learn how to display equations using this function but am not sure how to go about doing it. The

[R] Operator overloading for custom classes

2010-03-23 Thread Chidambaram Annamalai
Hi, I need some help to get some of the object orientation, specifically the methods that overload the basic arithmetic operations, from sample C++ code to R. I don't have experience with such advanced language features inside of R. So I was wondering if some of you could help me out in this

Re: [R] information module Wilks' lambda criterion

2010-03-23 Thread Charles C. Berry
On Tue, 23 Mar 2010, Catherine ENG wrote: Hi everybody, I was wondering if you can help me about a module. In fact, I'm looking for a package or module about Wilks' lambda criterion in R environment. I didn't find it in R website ( See ?summary.manova HTH, Chuck

[R] Creating pdfs using qplot in qqplot2

2010-03-23 Thread Bos, Roger
I am trying to create plots within a for loop and output them to a pdf. Here is a working example using plot: gg - data.frame(datadate=1:4, spread=5:8) pdf() for (i in 1:3) { plot(gg$datadate, gg$spread, main=i) } dev.off() I am

Re: [R] Creating pdfs using qplot in qqplot2

2010-03-23 Thread stephen sefick
you have to print the object gg - data.frame(datadate=1:4, spread=5:8) pdf() for (i in 1:3) { + d - qplot(gg$datadate, gg$spread, geom=line, main=i) + print(d)} dev.off() On Tue, Mar 23, 2010 at 1:14 PM, Bos, Roger roger@rothschild.com

[R] Conditional replacement of NA depending on value in the previous column

2010-03-23 Thread Mark Na
Dear R-helpers, I have a dataframe like this: ID X1 X2 X3 X4 X5 X6 49 1 1 1 0 NA NA 50 1 1 1 1 NA 1 I would like to convert a missing value (NA) that follows a 0 (zero) or another missing value (NA) into a 0 (zero). So, the above lines would be converted to: ID X1

Re: [R] Conditional replacement of NA depending on value in the previous column

2010-03-23 Thread Phil Spector
Mark - Does this do what you want? dat = data.frame(X1=c(1,1),X2=c(1,1),X3=c(1,1), X4=c(0,1),X5=c(NA,NA),x6=c(NA,1)) fixit = function(x){ y = c(x[-1],0) x[is.na(y) is.na(x)] = 0 x} t(apply(dat,1,fixit)) X1 X2 X3 X4 X5 x6 [1,] 1 1 1 0 0 0 [2,] 1

Re: [R] Creating pdfs using qplot in qqplot2

2010-03-23 Thread Sharpie
Bos, Roger-2 wrote: I am trying to create plots within a for loop and output them to a pdf. Here is a working example using plot: gg - data.frame(datadate=1:4, spread=5:8) pdf() for (i in 1:3) { plot(gg$datadate, gg$spread, main=i)

Re: [R] If else statements

2010-03-23 Thread Sharpie
tj wrote: Thanks Sam for the short but very helpful answer. That's what I only want to know. Thanks.=) ~tj Even though you got the answer you were looking for, I would still browse the material Matthew posted. The Introduction to R is a standard R manual that helped me greatly

[R] rpad ?

2010-03-23 Thread sjaffe
Is anyone using rpad? Is there any documentation or examples beyond that in the 'man' directory of the source? -- View this message in context: http://n4.nabble.com/rpad-tp1679534p1679534.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Operator overloading for custom classes

2010-03-23 Thread Sharpie
Chidambaram Annamalai wrote: Hi, I need some help to get some of the object orientation, specifically the methods that overload the basic arithmetic operations, from sample C++ code to R. I don't have experience with such advanced language features inside of R. So I was wondering if

Re: [R] Optim() Help, Unusual Error

2010-03-23 Thread Nikhil Kaza
missed a c(...) here, therefore no par defined. On Mar 23, 2010, at 12:58 PM, ApproxGaussian wrote: par-(e.1,e.2,e.3,e.4,e.5,e.6,e.7,e.8,e.9,e.10,e.11,e.12,e.13,e.14,e. 15,e.16,e.17,e.18,e.19,e.20,e.21,e.22,e.23,e.24,e.25,e.26,e.27,e.28) __

Re: [R] Optim() Help, Unusual Error

2010-03-23 Thread ApproxGaussian
I apologize, the c is in the original coding; I merely misprinted (copy and paste). I have edited the orginal post to reflect this. -- View this message in context: http://n4.nabble.com/Optim-Help-Unusual-Error-tp1679363p1679582.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] rpad ?

2010-03-23 Thread sjaffe
Based on a private response, it seems that rpad is no longer being maintained and in fact no longer works with the latest R release. I noticed that the web site listed in the FAQ no longer works, the code is being hosted by google code but it appears no one is working on it. Looking at the R

Re: [R] no predict function in lme4 ?

2010-03-23 Thread Douglas Bates
It is not easy to decide what predict should return for a linear mixed model, let alone the more complicated cases. Do you want predictions based on the fixed-effects only or based on a combination of the fixed-effects and the random-effects? For the lme function in the nlme package we allowed

Re: [R] help needed with boxplot

2010-03-23 Thread kathy_BJ
Thank you so much for help, Jim. But I didn't get any plot after I submit the job except below, which indicating the number of lines for the two inputs. What's the problem? Read 3360 records Read 3360 records I know I didn't confuse you. -- View this message in context:

Re: [R] rpad ?

2010-03-23 Thread Sharpie
sjaffe wrote: Based on a private response, it seems that rpad is no longer being maintained and in fact no longer works with the latest R release. I noticed that the web site listed in the FAQ no longer works, the code is being hosted by google code but it appears no one is working on it.

Re: [R] rpad ?

2010-03-23 Thread sjaffe
Sharpie wrote: You could try Sage: http://www.sagemath.org Yes, I've tried Sage (briefly) and it is very interesting. But what I'm looking for here is a client-server system that allows multiple users to access the results of R without exposing the details. -- View this message in

Re: [R] rpad ?

2010-03-23 Thread Sharpie
sjaffe wrote: Yes, I've tried Sage (briefly) and it is very interesting. But what I'm looking for here is a client-server system that allows multiple users to access the results of R without exposing the details. Maybe you're looking for something similar to this webapp:

Re: [R] Operator overloading for custom classes

2010-03-23 Thread Chidambaram Annamalai
Thanks! On Wed, Mar 24, 2010 at 1:01 AM, Sharpie ch...@sharpsteen.net wrote: Chidambaram Annamalai wrote: Hi, I need some help to get some of the object orientation, specifically the methods that overload the basic arithmetic operations, from sample C++ code to R. I don't have

Re: [R] rpad ?

2010-03-23 Thread Erich Neuwirth
We are using RPad for a teaching application here. But we had to find many things the hard way, and additionally, it did not survive the latest R release change. There is a minimal repair, but the maintainer does not answer any email any more. We did the repair and are giving a modified version to

[R] Saving tab/csv delimited data with NaN's

2010-03-23 Thread shankar
Hello, I am working multiple simulated data sets with missing values, I would like to store these data sets in either tab delimited format for .csv format with missing values marked as NaN's instead of NA's. I read the import/export document which mentions that write.table command

Re: [R] Saving tab/csv delimited data with NaN's

2010-03-23 Thread Rolf Turner
On 24/03/2010, at 9:50 AM, shan...@bios.unc.edu wrote: Hello, I am working multiple simulated data sets with missing values, I would like to store these data sets in either tab delimited format for .csv format with missing values marked as NaN's instead of NA's. I read the

[R] Adding matrix rows that have the same name?

2010-03-23 Thread Sarah Berke
Does anyone know if there is an R function that will take a matrix like this jim 1 0 0 0 0 0 jim 0 1 0 0 0 0 jim 0 0 1 0 0 0 bob1 0 0 0 0 0 bob0 0 1 0 0 0 harry 0 0 1 0 0 0 harry 0 0 0 1 0 0 harry 0 0 0 0 1 0 harry 0 0 0 0 0 1

Re: [R] rpad ?

2010-03-23 Thread Philippe Grosjean
Hello, You could try svSocket that creates a socket server where several clients can connect simultaneously. The server is restricted to local clients for obvious security reasons, but if you would like to access it though a network, you can use stunnel to transfer the data crypted with SSL.

Re: [R] Adding matrix rows that have the same name?

2010-03-23 Thread Henrique Dallazuanna
Try this: aggregate(as.data.frame(dum.mat.temp), list(row.names(dum.mat.temp)), sum) On Tue, Mar 23, 2010 at 6:15 PM, Sarah Berke skbe...@gmail.com wrote: Does anyone know if there is an R function that will take a matrix like this jim     1  0  0  0  0  0 jim     0  1  0  0  0  0 jim     0

Re: [R] Setting breaks to data more appropriately

2010-03-23 Thread ROLL Josh F
David Thanks you for the guidance. I am looking to drive the data into the intervals. Problem now is that I have a few 0 values that are returning as NA (e.g - (0.1,0.2] (0.1,0.2] (0.1,0.2] NA (0,0.1] ) This is causing issues when I try and use the brks to inform a clorepleth map. I

Re: [R] rpad ?

2010-03-23 Thread j verzani
sjaffe sjaffe at riskspan.com writes: Sharpie wrote: You could try Sage: http://www.sagemath.org Yes, I've tried Sage (briefly) and it is very interesting. But what I'm looking for here is a client-server system that allows multiple users to access the results of R

Re: [R] Sample size for proportion, not binomial

2010-03-23 Thread Marc Schwartz
On Mar 23, 2010, at 11:05 AM, Prew, Paul wrote: Hello, I am looking for a sample size function for samples sizes, to test proportions that are not binomial proportions. The proportions represent a ratio of (final measure) / (baseline measure) on the same experimental unit. Searches

Re: [R] Optim() Help, Unusual Error

2010-03-23 Thread Nikhil Kaza
I cannot replicate the error. The following seem to work. Y - runif(100) comp - matrix(runif(6500),100,65) par - rep(.5, 28) optim.results - optim(par, fn=objective.function, method=Nelder- Mead,comp=comp, Y=Y, n=100) # Not sure why you are selecting the columns in the comp. That is probably

Re: [R] Setting breaks to data more appropriately

2010-03-23 Thread David Winsemius
On Mar 23, 2010, at 5:23 PM, ROLL Josh F wrote: David Thanks you for the guidance. I am looking to drive the data into the intervals. Problem now is that I have a few 0 values that are returning as NA (e.g - (0.1,0.2] (0.1,0.2] (0.1,0.2] NA (0,0.1] ) This is causing issues when I

[R] Bold greek letters using plotmath

2010-03-23 Thread Jim Price
I'm trying to annotate some graphics using plotmath and finding out that the code I'm using isn't bolding the greek letters - it bolds the rest (once I adjusted the numerics to characters), it's just failing on the greek characters. Any suggestions welcomed. Jim Price. Cardiome Pharma Corp.

[R] Diffusion entropy analysis

2010-03-23 Thread Andrew Rominger
Hello, Does anyone know of an R implementation of diffusion entropy analysis (DEA) as proposed by Scafetta dn Grigolini (2002)? I was unable to find any existing functions, so I attempted to write up my own, but cannot reproduce known results, so obviously I'm doing something wrong. If there

Re: [R] Saving tab/csv delimited data with NaN's

2010-03-23 Thread Sharpie
shankar-17 wrote: Hello, I am working multiple simulated data sets with missing values, I would like to store these data sets in either tab delimited format for .csv format with missing values marked as NaN's instead of NA's. I read the import/export document which mentions that

[R] Plot ``freezes''.

2010-03-23 Thread Rolf Turner
In an elderly version of ``plotSymbols'' (now in the cwhmisc package) that I had lying around, there was the example plot(1:10,xlab=\374) which the comments said would give a u-umlaut as the x-axis label. When I execute this plot (a) I get no x-axis label at all, and (b) the

  1   2   >