[R] Trying to install rJava

2011-05-20 Thread Dat Mai
Hello All, I'm trying to install rJava in ubuntu, and ended up with the following: ~$ sudo R CMD javareconf JAVAC=/usr/lib/jvm/java-6-openjdk/jre/../bin/javac JAR=/usr/bin/jar JAVAH=/usr/bin/javah Java interpreter : /usr/bin/java Java version : 1.6.0_24 Java home path : /usr/lib/jvm/java-6-

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Dennis Murphy
Here's another option using the plyr package: library(plyr) ddply(dat, 'f', function(d) coef(lm(A ~ B, data = d))) Dennis On Fri, May 20, 2011 at 7:34 PM, wrote: > You have received suggestions about this already, but you may want to > consider something like this as an alternative: > >> requ

Re: [R] identical function names from 2 packages

2011-05-20 Thread baptiste auguie
I imagine mind_read() easy to implement with Robin Hankin's emulator package -- under some weak assumptions about the user; mind_write(), however, seems more involved and might require investing in new hardware. Best, baptiste On 21 May 2011 12:04, Rolf Turner wrote: > > On reflection, it seems

Re: [R] Variability plot in R

2011-05-20 Thread Dennis Murphy
Here's one attempt; I only used five of the wafers since you didn't provide any data. dd <- data.frame(wafer = factor(rep(1:5, each = 6)), operator = factor(rep(rep(1:3, each = 2), 5)), thickness = c(0.62, 0.66, 0.53, 0.53, 0.51, 0.55,

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Bill.Venables
You have received suggestions about this already, but you may want to consider something like this as an alternative: > require(english) > lev <- as.character(as.english(0:9)) > dat <- data.frame(f = factor(sample(lev, 500, + rep=TRUE), levels = lev), + B = rno

Re: [R] Adding a numeric to all values in the dataframe

2011-05-20 Thread David Winsemius
On May 20, 2011, at 9:50 PM, John Kane wrote: I didn't quite understand your first post. Was it intended to assure that the operation was only on numeric variables? Prezactly. Otherwise I don't see the differnce in applying the operation to a totally numeric data.frame and a matrix.

Re: [R] Contrasts in Penalized Package

2011-05-20 Thread Bill.Venables
The key line is prep <- .checkinput(match.call(), parent.frame()) Among other things the model matrix is built in .checkinput( ) which is not exported from the package namespace. So you have to get rough with it and use penalized:::.checkinput and then you see these line of code

Re: [R] Adding a numeric to all values in the dataframe

2011-05-20 Thread John Kane
I didn't quite understand your first post. Was it intended to assure that the operation was only on numeric variables? Otherwise I don't see the differnce in applying the operation to a totally numeric data.frame and a matrix. -- On Fri, 5/20/11, bill.venab...@csiro.au wrote: > From: bill.v

Re: [R] Adding a numeric to all values in the dataframe

2011-05-20 Thread Bill.Venables
Oops The first line of my template should use data.matrix() rather than data.frame() data.matrix() is guaranteed to return a numerical matrix from a data frame, making arithmetic always possible. Bill Venables. From: Venables, Bill (CMIS, Dutton Park) S

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-20 Thread Bryan Hanson
Hi Patrick, here is the set up: Everyone is already sharing all the files and has full access. We have an Rnw file which generates a report and uses a csv file in a "nearby" directory. Dropbox keeps it all sync'd. But, if Person A is working on the file on their computer the path to the

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-20 Thread Patrick Connolly
On Fri, 20-May-2011 at 02:05PM -0400, Bryan Hanson wrote: > Hello Kindred R Spirits... > > I'm trying to get a file (csv) from Dropbox using their shareable link > concept. They issue a short URL that goes to a web page where you see a > button that says "Download File". They don't really giv

Re: [R] identical function names from 2 packages

2011-05-20 Thread Rolf Turner
On reflection, it seems to me that what we really need here is Prof. Ripley's mind_read() function that was foreshadowed some years ago (see fortune("mind_read")) so that R could determine just *which* lm() (for example) function the user has in mind when he or she types ``lm(...)'' at the keyboa

Re: [R] Variability plot in R

2011-05-20 Thread David Winsemius
On May 20, 2011, at 7:12 PM, Joseph Boyer wrote: Is there a package in R that can do a variability plot? A variability plot is a kind of categorized dot plot. (If there is a lot of data in each category, box plots are used rather than dot plots.) Usually, the categories are factor level co

Re: [R] How to do covariate adjustment in R

2011-05-20 Thread Peter Langfelder
On Thu, May 19, 2011 at 10:58 PM, karena wrote: > Thank you so much for this reply, Peter. It helps. > > I know this is one way to adjust for covariates. However, if what I want is > to get the 'remaining values' after adjustment. For example, say, 'gene > expression' value is denoted as 'ge', and

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread David Winsemius
On May 20, 2011, at 11:45 AM, Francesco Nutini wrote: Please forgive me for all these questions Dimitri... I'm running these input: mylist<-NULL #in order to hold my input for(i in levels(mydataset$c)) { temp.data<-mydataset [mydataset$c %in % i] Actually looking at that the second time m

[R] Variability plot in R

2011-05-20 Thread Joseph Boyer
Is there a package in R that can do a variability plot? A variability plot is a kind of categorized dot plot. (If there is a lot of data in each category, box plots are used rather than dot plots.) Usually, the categories are factor level combinations. All the dot plots appear in the same window

Re: [R] grep pattern

2011-05-20 Thread David Winsemius
On May 20, 2011, at 11:57 AM, Kang Min wrote: Hi all, I'm trying to subset a pattern in a vector. Each argument has 6 letters, and I need those that start with Z and end with Z. e.g. x <- c("ZFHSJK", "ZFHJKZ","ZIOPWE","ZLKJSD","ZKFLPZ") I've looked up other discussions but still can't seem t

[R] outout clarification of fitdist {fitdistrplus} output

2011-05-20 Thread Alexander Kapeller
Hello, I like to fit data against a negative binominal distribution x2<-c(rep(10,14),rep(9,8),rep(8,13),rep(7,11),rep(6,6),rep(5,18),rep(4,7),re p(3,21),rep(2,33),rep(1,55),rep(0,225)) f2<-fitdist(x2,"nbinom",method="mle") plot(f2) summary(f2) gofstat(f2) I receive the following res

[R] multilevel

2011-05-20 Thread eeecon
Hi, My code indicates there may be a bug in multilevel. I doubt this is actually the case, can anyone tell me what is wrong with my code? The data file for this code can be downloaded here: http://cameron.econ.ucdavis.edu/mmabook/mma15p4gev.asc Here is the code that generates the bug: rm(list =

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Francesco Nutini
Please forgive me for all these questions Dimitri... I'm running these input: mylist<-NULL #in order to hold my input for(i in levels(mydataset$c)) { temp.data<-mydataset [mydataset$c %in% i] mylist[[i]]<- lm(temp.data$a ~ temp.data$b , data=temp.data) } That's the erros returns Error in `[

[R] grep pattern

2011-05-20 Thread Kang Min
Hi all, I'm trying to subset a pattern in a vector. Each argument has 6 letters, and I need those that start with Z and end with Z. e.g. x <- c("ZFHSJK", "ZFHJKZ","ZIOPWE","ZLKJSD","ZKFLPZ") I've looked up other discussions but still can't seem to find the answer. Thanks. Kangmin

Re: [R] How to do covariate adjustment in R

2011-05-20 Thread karena
Thanks a lot for the great help, Timothy! K -- View this message in context: http://r.789695.n4.nabble.com/How-to-do-covariate-adjustment-in-R-tp3537463p3538962.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

[R] RPART error

2011-05-20 Thread victor pontes
Hi, I have been working generating decision tree analyses on large numbers of simulation datasets using the RPART function.  With some datasets, RPART is returning an error of "Error in yval[, 1] : incorrect number of dimensions".  There seem to be certain types of splits that cause it to break

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-20 Thread Timothy Bates
The problem is that dropbox sharable links unpack to https URIs, and R doesn't support secture http (at least not on Mac, not sure about other platforms). Would be great to compile the read.table etc. functions to use curl when it is installed, as curl supports a myriad of protocols. Rcurl pac

Re: [R] Multiple count if style "queries"

2011-05-20 Thread David Winsemius
On May 20, 2011, at 6:01 PM, Chris Mcowen wrote: Is the dput output included not usable either? I have tested it on my machine and it works fine. It's fine. I assumed you were referring to the "data" you did include in the first posting with all the spaces and tabs and didn't scroll down

Re: [R] Multiple count if style "queries"

2011-05-20 Thread Chris Mcowen
Thanks Phil, I will investigate how to put it into a exportable object. Chris On 20 May 2011, at 23:08, Phil Spector wrote: Chris - It's pretty easy to calculate these counts, the tricky part is what kind of object to put them in. Here's a way that returns a list of lists: > parts = split(da

Re: [R] Multiple count if style "queries"

2011-05-20 Thread Phil Spector
Chris - It's pretty easy to calculate these counts, the tricky part is what kind of object to put them in. Here's a way that returns a list of lists: parts = split(data2,data2$ECO_NAME) result = lapply(parts,function(x) list(Order=table(as.character(x$Order)), F

Re: [R] Multiple count if style "queries"

2011-05-20 Thread Chris Mcowen
Is the dput output included not usable either? I have tested it on my machine and it works fine. Thanks On 20 May 2011, at 22:57, David Winsemius wrote: On May 20, 2011, at 5:50 PM, Chris Mcowen wrote: > Sorry for not including the data, i did intend to. You included the data, just not in

Re: [R] svytable and na's

2011-05-20 Thread Thomas Lumley
On Fri, May 20, 2011 at 7:54 PM, Manderscheid Katharina wrote: > hi thomas > > thanks for your reply. > in the documentation of svytable, the argument na.rm=T is mentioned. No, it isn't. The page says Usage ## S3 method for class 'survey.design': svytable(formula, design, Ntotal = NULL, round

Re: [R] Multiple count if style "queries"

2011-05-20 Thread David Winsemius
On May 20, 2011, at 5:50 PM, Chris Mcowen wrote: Sorry for not including the data, i did intend to. You included the data, just not in a format that anyone could reasonably be expected to edit so it can be used. Please read the Posting Guide. -- David. I tried your code but got this

Re: [R] Multiple count if style "queries"

2011-05-20 Thread Chris Mcowen
Sorry for not including the data, i did intend to. I tried your code but got this error: > > answer <- sqldf(" > + select ECO_NAME > + , count(distinct Order) as Order > + , count(distinct Family) as Family > + , count(distinct Genus) as Genus > +

Re: [R] Multiple count if style "queries"

2011-05-20 Thread jim holtman
use the 'sqldf' package. Also use 'dput' to include sample data since it was impossible to use the data in the format you provided, so my guess at a solution would be: answer <- sqldf(" select ECO_NAME , count(distinct Order) as Order , count(distinct Family) as

[R] Multiple count if style "queries"

2011-05-20 Thread Chris Mcowen
Dear List, I am looking to calculate two things from my data frame and was after some advice. For the example below i want to know. 1. How many unique Orders/Families and Genera there are per eco-name 2. How many incidences are there for each Order/Family and Genus there are per eco-region I

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Greg Snow
Look at the lmList function in the nlme package, it does what I think you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Greg Snow
I think that the Rcmdr package already does a lot of what you want, rather than starting from scratch you should check it out. Rcmdr has the functionality of letting you write your own add-ins, so if it currently does not have the functions that you want you could just create an add-in to add t

Re: [R] identical function names from 2 packages

2011-05-20 Thread Greg Snow
>From the command line the namespaces may not help much (I am happy to be >corrected). But if I am running a function from the command line then I can >check the search path to see if there is a conflict and make sure to call the >correct one, the bigger problem is when writing another package

Re: [R] Converting the graphics window to a data matrix

2011-05-20 Thread Greg Snow
The EBImage package from bioconductor will read image files (png and others), the object read has a slot called .Data that is a 3 dimensional array with one dimension being the color (red,green,blue), so you could just grab one of those 3 layers and it would probably be what you want (or some fu

[R] glmnet_1.6 fails to install due to unsupported Fortran 90 compiler

2011-05-20 Thread Juergen Rose
Hi, if I try to install glmnet, the installation fails with: > install.packages("glmnet",dependencies=TRUE) trying URL 'http://mirrors.softliste.de/cran/src/contrib/glmnet_1.6.tar.gz' Content type 'application/x-gzip' length 522657 bytes (510 Kb) opened URL ===

[R] Downloading a csv from Dropbox using the shareable link

2011-05-20 Thread Bryan Hanson
Hello Kindred R Spirits... I'm trying to get a file (csv) from Dropbox using their shareable link concept. They issue a short URL that goes to a web page where you see a button that says "Download File". They don't really give you the URL of the file itself, just this page. Is there a wa

Re: [R] changes in coxph in "survival" from older version?

2011-05-20 Thread Shi, Tao
Thank you very much, Frank and Terry, again, for all your answers! ...Tao - Original Message > From: Terry Therneau > To: "Shi, Tao" > Cc: Frank Harrell ; r-help@r-project.org > Sent: Fri, May 20, 2011 6:36:28 AM > Subject: Re: [R] changes in coxph in "survival" from older version?

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Dimitri Liakhovitski
I think you don't need to write "temp.data$a ~ temp.data$b" just "a ~ b" On Fri, May 20, 2011 at 11:45 AM, Francesco Nutini wrote: > Please forgive me for all these questions Dimitri... > > I'm running these input: > > mylist<-NULL #in order to hold my input >  for(i in levels(mydataset$c)) { tem

[R] identifying groups

2011-05-20 Thread Sebastián Daza
Hi everyone, Does anyone know if there is a package to perform a Moody's Crowds routine to identify groups using R, or other algorithms designed to search groups by maximizing modularity scores? Otherwise, other packages to identify groups, or other programs to do it. I have about 80 network

[R] WG: Re: source and localhost

2011-05-20 Thread Thomas . Bock
> > Re: [R] source and localhost > > On Fri, 20 May 2011, Uwe Ligges wrote: > > > > > > > On 20.05.2011 17:22, thomas.b...@ptb.de wrote: > >> Dear List, > >> > >> I have problems with the function source() using a > >> url of the kind: > >> > >> http://localhost:5984/path/fn.R > > > > Does > >

Re: [R] source and localhost

2011-05-20 Thread Thomas . Bock
> > > On 20.05.2011 17:22, thomas.b...@ptb.de wrote: > > Dear List, > > > > I have problems with the function source() using a > > url of the kind: > > > > http://localhost:5984/path/fn.R > > Does > > con <- url("http://localhost:5984/path/fn.R";) > source(url) > close(con) > > work for you? N

Re: [R] source and localhost

2011-05-20 Thread Prof Brian Ripley
On Fri, 20 May 2011, Uwe Ligges wrote: On 20.05.2011 17:22, thomas.b...@ptb.de wrote: Dear List, I have problems with the function source() using a url of the kind: http://localhost:5984/path/fn.R Does con <- url("http://localhost:5984/path/fn.R";) source(url) close(con) work for you?

Re: [R] source and localhost

2011-05-20 Thread Uwe Ligges
On 20.05.2011 17:22, thomas.b...@ptb.de wrote: Dear List, I have problems with the function source() using a url of the kind: http://localhost:5984/path/fn.R Does con <- url("http://localhost:5984/path/fn.R";) source(url) close(con) work for you? Please read ?source carefully and note it

[R] DocumentTermMatrix - text minig

2011-05-20 Thread Matevž Pavlič
Hi All, I have a Data.frame that looks like that one below. I would like to do some text mining on it to possibly find some patterns between Opis, ACklasifikacija and Vodja. I looked over a tm package which loks promissing, more specifically DocumentTermMatrix or TermDocumentMatrix. But I c

[R] source and localhost

2011-05-20 Thread Thomas . Bock
Dear List, I have problems with the function source() using a url of the kind: http://localhost:5984/path/fn.R I receive Fehler in file(file, "r", encoding = encoding) : kann Verbindung nicht öffnen Zusätzlich: Warnmeldung: In file(file, "r", encoding = encoding) : Öffnen fehlgeschlagen: H

[R] DocumentTermMatrix - text minig

2011-05-20 Thread Matevž Pavlič
Hi All, I have a Data.frame that looks like that one below. I would like to do some text mining on it to possibly find some patterns between Opis, ACklasifikacija and Vodja. I looked over a tm package which loks promissing, more specifically DocumentTermMatrix or TermDocumentMatrix. But I c

Re: [R] Anyone successfully install Rgraphviz on windows with R 2.13?

2011-05-20 Thread Michael Conklin
Thanks to everyone who responded. The ReadMe file did the trick. It is too bad that it is so well hidden :) W. Michael Conklin Chief Methodologist Google Voice: (612) 56STATS MarketTools, Inc. | www.markettools.com 6465 Wayzata Blvd | Suite 170 |  St. Louis Park, MN 55426.  PHONE: 952.417.4719

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Jonathan Gabris
If you want a GUI that only communicates with R, and is not created within R, you can use Qt. Startup R.exe using a QProcess and send ready formatted commands to the background R.exe whan you activate a control (button, slider,..) I find this works well if you want a "just click on the button

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Bert Gunter
... and yet another, on Windows ONLY and with limited functionality -- which nevertheless sufficed for my unsophisticated needs -- is to use several built-in R functions in the utils package (the win... ones courtesy of Duncan Murdoch) that access native Windows functionality. See ?winMenuAdd ?sel

Re: [R] regression coefficient for different factors

2011-05-20 Thread Francesco Nutini
Yes Dimitri that's what I mean! Something like this? for(i in levels(c)) { lm(a ~ b * c , data=mydataset)} And what about to see the output? Thanks! > Date: Fri, 20 May 2011 09:46:08 -0400 > Subject: Re: [R] [r] regression coefficient for different factors > From: dimitri.liakhovit

Re: [R] Building Custom GUIs for R

2011-05-20 Thread vioravis
Thanks everyone. I will try out the packages you have mentioned. Ravi -- View this message in context: http://r.789695.n4.nabble.com/Building-Custom-GUIs-for-R-tp3537794p3538539.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

Re: [R] Constrainted Nonlinear Optimization - lack of convergence

2011-05-20 Thread mcgrete
Hello all, I did find a bug in coding my cost function; I have only run a few examples to verify it works properly, but this appears to have solved most of my questions. I did find that some of my inequality constraints are not met, e.g. if z1=0; z2=0 are two equality constraints, often the code

Re: [R] dbetagen function in mc2d package

2011-05-20 Thread krusty the klown
bbolker wrote: > > krusty the klown libero.it> writes: > >> I found this useful package for generalized beta, yet the function that >> calculates its density leaves me puzzled, especially when I plotted it: >> >> plot(function(y) dbetagen(y,4,1.2,min=0,max=40),xlim=c(0,40)) >> >> The area bet

Re: [R] Memory capacity question for a specific situation

2011-05-20 Thread Dimitri Liakhovitski
Thanks a lot, Uwe! 2011/5/20 Uwe Ligges : > > > On 20.05.2011 15:33, Dimitri Liakhovitski wrote: >> >> Hello! >> >> I am trying to figure out if my latest R for 64 bits on a 64-bit >> Windows 7 PC, RAM = 6 GB could read in a dataset with: >> >> ~64 million rows >> ~30 columns about half of which c

Re: [R] Memory capacity question for a specific situation

2011-05-20 Thread Uwe Ligges
On 20.05.2011 15:33, Dimitri Liakhovitski wrote: Hello! I am trying to figure out if my latest R for 64 bits on a 64-bit Windows 7 PC, RAM = 6 GB could read in a dataset with: ~64 million rows ~30 columns about half of which contain integers (between 1 and 3 digits) and half - numeric data (t

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Dimitri Liakhovitski
First you have to create something (e.g., a list) that holds your output: mylist<-NULL Then you loop through the levels of c and run a regression of a onto b (no need to include c anymore because c will have zero variance within each level of c): for(i in levels(c)){ temp.data<-mydataset[mydata

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Dimitri Liakhovitski
Francesco, do you just want a separate regression for each level of your factor c? You could write a loop - looping through levels of c: for(i in levels(c)){ select your data here and write a regression formula } On Fri, May 20, 2011 at 9:39 AM, Francesco Nutini wrote: > > Thanks for your rep

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Francesco Nutini
Thanks for your reply, ?summary produce a multiple r2. My dataset il similar to this one: >a b c > 1 -1.4805676 0.9729927 x > 2 1.5771695 0.2172974 x > 3 -0.9567445 0.5205087 x > 4 -0.9200052 0.8279428 z > 5 -1.9976421 0.9641110 z > 6 -0.2722960 0.6318801 y So, I would l

Re: [R] changes in coxph in "survival" from older version?

2011-05-20 Thread Terry Therneau
On Thu, 2011-05-19 at 17:03 -0700, Shi, Tao wrote: > Thank you, Frank and Terry, for all your answers! I'll upgrade my "survival" > package for sure! > > It seems to me that you two are pointing to two different issues: 1) Is > stepwise > model selection a good approach (for any data)? 2) Wh

[R] Memory capacity question for a specific situation

2011-05-20 Thread Dimitri Liakhovitski
Hello! I am trying to figure out if my latest R for 64 bits on a 64-bit Windows 7 PC, RAM = 6 GB could read in a dataset with: ~64 million rows ~30 columns about half of which contain integers (between 1 and 3 digits) and half - numeric data (tens to thousands). Or is it too much data? And even

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Smith, Dale
Another alternative is to distribute an exe (built in C# or tcl) which communicates with a web service. The web service may then call R on a private server (behind a firewall) using Rserve. In this way the R code is not distributed to the customer, but remains in the remote web service. This also s

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Barry Rowlingson
On Fri, May 20, 2011 at 7:52 AM, vioravis wrote: > Are there any tools currently available that enable us build GUIs??? (MATLAB > has a GUI builder that enables the users build custom GUIs). Another option nobody has mentioned yet is to make it a web-based system, and generate your dialogs usin

[R] "useR! 2011" conference, registration deadline 27 May

2011-05-20 Thread David Firth
REMINDER of registration deadline next week "useR! 2011" The conference for R users worldwide. Sponsored annually by the R Foundation for Statistical Computing. 16-18 August 2011 University of Warwick, Coventry, UK (Pre-conference tutorial sessions 15 August) Invited speakers: Adrian Bowman, L

Re: [R] [r] regression coefficient for different factors

2011-05-20 Thread Robert Baer
?summary produces r^2 in 2nd to last line, as in, set.seed(12); a=rnorm(100); b = runif(100); c = factor(rep(c('No', 'Yes'),50)); df = data.frame(a,b,c) head(df) a b c 1 -1.4805676 0.9729927 No 2 1.5771695 0.2172974 Yes 3 -0.9567445 0.5205087 No 4 -0.9200052 0.8279428 Ye

Re: [R] Specifying Splits WhenUusing rpart

2011-05-20 Thread Terry Therneau
> I'd like to force rpart to use a specific variable, namely "spec" as > the first split and then allow it to proceed as usual. Is there a way > to do this? You can often get this effect by using the "cost" argument. Make the variable in question have very low cost. Terry Therneau __

Re: [R] scales argument in bwplot (lattice)

2011-05-20 Thread Peter Ehlers
On 2011-05-18 17:50, Duncan Mackay wrote: Hi Peter A little late but catching up see ? combineLimits from the latticeExtra package a very welcome addition in particular when combined with useOuterStrips with multiple conditioning I agree that latticeExtra has some very nice goodies, but in t

Re: [R] Building Custom GUIs for R

2011-05-20 Thread jverzani
vioravis gmail.com> writes: > > I am looking to build simple GUIs based on the R codes I have. The main > objective is to hide the scary R codes from non-programming people > and make it easier for them to try out different inputs. > ... snip ... > Are there any tools currently available th

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Jonathan Daily
Some good tcltk examples can be found online [1]. I have also found the fgui package on CRAN [2], though I have not actually used it yet. [1] http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/ [2] http://cran.cnr.berkeley.edu/web/packages/fgui/index.html On Fri, May 20, 2011 at 2:52 AM, viorav

[R] Contrasts in Penalized Package

2011-05-20 Thread Lars Bishop
Hi, The "penalized" documentation says that "Unordered factors are turned into as many dummy variables as the factor has levels". This is done by a function in the package called contr.none. I'm trying to figure out how exactly is a model matrix created with this contrast option when the user call

Re: [R] How to do covariate adjustment in R

2011-05-20 Thread Timothy Bates
Dear Karena, x = 1:100 y = rnorm(100) fit = lm(x~y) # what properties does a fit have? names(fit) # [1] "coefficients" "residuals" "effects" "rank" "fitted.values" "assign""qr" # [8] "df.residual" "xlevels" "call" "terms" "model"

Re: [R] Factors to Columns

2011-05-20 Thread David martin
Works !! thanks On 05/20/2011 12:08 PM, Dennis Murphy wrote: Hi: I'm not sure I have the student part right, but here's one way to get the structure you're looking for with the reshape2 package: Example: dat<- data.frame(student = rep(1:10, 3), val = round(rnorm(30, m = 22.5

Re: [R] Factors to Columns

2011-05-20 Thread Dennis Murphy
Hi: I'm not sure I have the student part right, but here's one way to get the structure you're looking for with the reshape2 package: Example: dat <- data.frame(student = rep(1:10, 3), val = round(rnorm(30, m = 22.5, s = 3.0), 1), parm = factor(rep(c('AGE', 'SC

[R] Factors to Columns

2011-05-20 Thread David martin
> str(data) 'data.frame': 250 obs. of 3 variables: $ student: chr "A" "B" "C" "D" ... $ data : num 20.2 20.4 22.5 22.1 23.3 ... $ param : Factor w/ 4 levels "AGE","SCHOOL",..: 1 1 1 1 1 1 1 1 1 1 Hi , i would like to split the dataframe so that each level of param is a column At th

Re: [R] identical function names from 2 packages

2011-05-20 Thread Janko Thyson
Thanks for the info. I think I've tried that a while ago, but IIRCC, the problem was always that R won't let me create on object that would pass as a full grown NAMESPACE object. > foo <- function(x) print(x) > assignInNamespace(x="foo", value=foo, ns="testNS") Fehler in loadNamespace(name) :

[R] [r] regression coefficient for different factors

2011-05-20 Thread Francesco Nutini
Dear R-helpers, In my dataset I have two continuous variable (A and B) and one factor. I'm investigating the regression between the two variables usign the command lm(A ~ B, ...) but now I want to know the regression coefficient (r2) of A vs. B for every factors. I know that I can obtain this i

Re: [R] Pie chart

2011-05-20 Thread Jim Lemon
On 05/19/2011 10:07 PM, Silvano wrote: I made a pie chart and the names of the levels are outside the circle. How do I put the names of the levels within each sector? names(tab13) = paste(c('Regular', 'Bom', 'Excelente'), round(100*prop.table(tab13), dig=1), "%") pie(tab13, col=c("LightYellow",

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Jonathan Gabris
You can also look at: - Journal of Statistical Software - dec 2010, vol 37, Issue 8 (for using RGtk2) - RNews vol. 6/4, october 2006 (for using tcltk) Jonathan On 20/05/2011 10:42, Rubén Roa wrote: Check the PBSModelling package. HTH Rubén

Re: [R] identical function names from 2 packages

2011-05-20 Thread Barry Rowlingson
On Fri, May 20, 2011 at 9:16 AM, Janko Thyson wrote: > Yet, IMHO there will be more and more problems regarding this in the > future as the number of contributed packages keeps growing. I personally > would not mind at all to get used to typing 'thePackage::foo()' *all* > the time, or at least ha

Re: [R] Building Custom GUIs for R

2011-05-20 Thread Rubén Roa
Check the PBSModelling package. HTH Rubén Dr. Rubén Roa-Ureta AZTI - Tecnalia / Marine Research Unit Txatxarramendi Ugartea z/g 48395 Sukarrieta (Bizkaia) SPAIN > -Mensaje original- > De: r-help-bo

[R] Building Custom GUIs for R

2011-05-20 Thread vioravis
I am looking to build simple GUIs based on the R codes I have. The main objective is to hide the scary R codes from non-programming people and make it easier for them to try out different inputs. For example, 1. The GUI will have means to upload a csv file which will be read by the R code. 2.

Re: [R] foreach: how to create array (of lists) as result?

2011-05-20 Thread Animesh Saxena
Thanks a lot! It worked perfectly I just tried a simple modification... > dc<-array(sapply(sapply(modelprices[2], c), c)) On 5/20/11 12:11 PM, mhofert wrote: okay, I should have remembered... Gabor suggested a pretty nice solution, see: http://r.789695.n4.nabble.com/How-to-create-an-array

Re: [R] A better way to do this

2011-05-20 Thread Lao Meng
You may try "xyplot" 2011/5/20 1Rnwb > Hello gurus, > > I have a dataframe containing two groups viz., 'control' and 'case', each > of > these groups contains longitudinal data for 100 subjects. I have to plot > all > these subjects on a single chart and then put a regression line for each of >

[R] Spline Function

2011-05-20 Thread Animesh Saxena
I am using R for volatility calibration (Variance Gamma distribution). My question is very basic and not at all related to mathematics! y=spline(KK,CallPrices,,"fmm",,,strikes) When calling spline function it returns a list y The list contains some numbers which I have to subtract from ano

Re: [R] identical function names from 2 packages

2011-05-20 Thread Janko Thyson
Hi, I encounter similar problems as well and posted a while ago about this. Namespaces are cool, but isn't it very much up to a package's position in the search path (which is quite arbitrary depending on the packages loaded) that determines which namespace "dominates"? That leaves it to the u

Re: [R] svytable and na's

2011-05-20 Thread Manderscheid Katharina
hi thomas thanks for your reply. in the documentation of svytable, the argument na.rm=T is mentioned. however, last night i figured out what went wrong in my tabulation: i had a dataset which i attached and then defined the missing values - of course they were not stored in the data set. atta

Re: [R] Shrink file size of pdf graphics

2011-05-20 Thread Philipp Pagel
On Thu, May 19, 2011 at 01:35:51PM -0700, Layman123 wrote: > I tried both, the plot devices in R and pdftk. First I tried the png-device, > but as I wanted to increase the number of pixels with 'width' and 'height', > the labels are getting smaller When I really need a png, I usually produce a pd

Re: [R] identical function names from 2 packages

2011-05-20 Thread Rolf Turner
My understanding (which is pretty shaky when it comes to namespaces) is that if you have things set up correctly then namespaces will make sure that function calls within functions in the given package will be to be to functions in that package and not to their doppelgangers in other packages whi

[R] indexing an array of lists: any nicer way?

2011-05-20 Thread Marius Hofert
Dear expeRts, I'm struggling a bit with arrays of lists. The nice thing about arrays is that one can easily access subsets. For example: arr. <- array(1:24, dim=c(2,3,4), dimnames=list(a=c("a1","a2"), b=c("b1","b2","b3"), c=c("c1","c2","c3","c4"))) arr.[,,4] me