Re: [R] Creating GUIs for R

2008-10-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Greg Snow wrote: http://rcom.univie.ac.at/ Or just install the RExcelInstaller package and run the installRExcel function. A book on the interface will be coming out sometime in Winter. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED]

Re: [R] Space between bars in barplot

2008-10-09 Thread Richard . Cotton
with the space parameter it is possible to change the gap / distance between the bars, but is it also possible to change the space after each 6th bar? So for example you have bars from 1 to 6 then a large gap and then the next six bars from 7 to 12 Try, for example y - runif(13) y[7] - NA

Re: [R] Space between bars in barplot

2008-10-09 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: with the space parameter it is possible to change the gap / distance between the bars, but is it also possible to change the space after each 6th bar? So for example you have bars from 1 to 6 then a large gap and then the next six bars from 7 to 12

Re: [R] Plot means with error bars - A novice needs help

2008-10-09 Thread Frank E Harrell Jr
Jim Lemon wrote: Michael Just wrote: Thank you all for you suggestions. They are all helpful. However, I have come to a more fundamental problem. Preparing my data to even make such a graph. I thought I was ready. I will obviously need to find the n, mean, and confidence interval for my data

Re: [R] Censboot Warning and Error Messages

2008-10-09 Thread Meral Yay (Findikli)
I have been trying to use the censored bootstrap function 'censboot' from the library boot, with the function 'survfit' from the library survival. I get the error message: In min(surv$time[inds[1 - surv$surv[inds] = 0.5]]) ... : no non-missing arguments to min; returning Inf Does anyone

[R] R loops

2008-10-09 Thread assa . yeroslaviz
hello everybody, I have a directory with over 3000 files with different names. I would like to make some vectors with the file names which are belong together. I'm trying to do it with a for loop in R: SF - c(ad, cd, cer, stress, salty, PC, high, transfer, cold, heat) # the pattern to look

Re: [R] How to join the two tables based on one overlapped column

2008-10-09 Thread ss
Hi Dan, Please ignore my previous question. I figured it out by specifying all.x=FALSE. Have a great day! Allen On Wed, Oct 8, 2008 at 8:28 PM, ss [EMAIL PROTECTED] wrote: Hi Dan, Thanks a lot for this! It works but I have some minor issues. Let's take the working example for instance,

Re: [R] plot-parameter pch without influence when plotting a data-frame

2008-10-09 Thread Oliver Bandel
Zitat von Gerhard Schön, UKE Hamburg [EMAIL PROTECTED]: what is the result of: df - data.frame(x = 1:5, y = 1:5) plot(df, pch = 1:5) It prints different symbols. It seemed, that my pch-settings had an effect, but some symbols were very similar, especially, when a lot of them are plotted at

[R] Turn factors to numeric

2008-10-09 Thread joseph kambeitz
I am having some problems while trying to fit simple data. I aggregated some data using: data1 - aggregate(data1$T2, list=(SOA=data1$SOA), mean) unfortunatly this coerces my variable SOA into a factor. Therefore when a afterwards try to fit a simple equation to my variable T2 using a formula on

Re: [R] adjusted t-test with unequal variance

2008-10-09 Thread Greg Snow
Try the gls function in the nlme package. It allows you to model the variance as well as the mean. -Original Message- From: Bunny, lautloscrew.com [EMAIL PROTECTED] To: r-help@r-project.org r-help@r-project.org Sent: 10/9/08 3:40 AM Subject: [R] adjusted t-test with unequal variance

[R] Odp: Observed responses in 'augPred' data frame - Wrong order ?

2008-10-09 Thread Petr PIKAL
Hi I had similar problem before and I ended with some ordering of groups before making grouped data object but it was data specific so I can not give you definite clue. Regards Petr [EMAIL PROTECTED] napsal dne 08.10.2008 19:30:07: Dea-R community. I'd like to draw your attention to an

Re: [R] histogram loses top row with alpha transparency under Windows

2008-10-09 Thread Richard Cotton
k.ponting wrote: Hello all. Trying to use transparency for overlaid histogram plots I have come across an interesting inconsistency, possibly a bug when running under Windows. Originally noticed in R 2.7.1, it is still there in 2.8.0 beta. library(lattice) zz - function(n,alpha) {

Re: [R] Reading zipped data directly from an FTP url

2008-10-09 Thread Prof Brian Ripley
On Thu, 9 Oct 2008, michael watson (IAH-C) wrote: Hi Sorry, I am clearly missing something here. Yes, you need to use unz() for a zip file, and it does not handle urls (only url does). So download the file (download.file()) first. I want to read this file directly:

Re: [R] Turn factors to numeric

2008-10-09 Thread Charilaos Skiadas
R-FAQ 7.10: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors- to-numeric_003f On Oct 9, 2008, at 6:59 AM, joseph kambeitz wrote: I am having some problems while trying to fit simple data. I aggregated some data using: data1 - aggregate(data1$T2, list=(SOA=data1$SOA),

Re: [R] ParallelR

2008-10-09 Thread Hesen Peng
Hi, I wonder if there are any parallel package which do not rely on mpi or pvm? On Wed, Oct 8, 2008 at 5:09 PM, Markus Schmidberger [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chi, ParallelR is a commercial software to run R in parallel. It is working very

Re: [R] R loops

2008-10-09 Thread Wacek Kusnierczyk
[EMAIL PROTECTED] wrote: hello everybody, I have a directory with over 3000 files with different names. I would like to make some vectors with the file names which are belong together. I'm trying to do it with a for loop in R: SF - c(ad, cd, cer, stress, salty, PC, high, transfer, cold,

Re: [R] plot-parameter pch without influence when plotting a data-frame

2008-10-09 Thread John Kane
--- On Thu, 10/9/08, Oliver Bandel [EMAIL PROTECTED] wrote: From: Oliver Bandel [EMAIL PROTECTED] Subject: Re: [R] plot-parameter pch without influence when plotting a data-frame To: Gerhard Schön, UKE Hamburg [EMAIL PROTECTED] Cc: R-help r-help@r-project.org Received: Thursday, October 9,

[R] Interpretation in cor()

2008-10-09 Thread Michael Just
Hello, I am performing cor() of some of my data. For example, I'll do 3 corr() (many variables) operations, one for each of the three treatments. I then do the following: i -lower.tri(treatment1.cor) cor(cbind(one = treatment1.corr[i], two = treatment2.corr[i], three = treatment3.corr[i]))

[R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Sean Davis
We have spent some time setting up Sun Grid Engine and OpenMPI on a group of linux boxes. I have created a parallel environment and everything seems to be working. I have Rmpi 0.5.5-5 installed on all machines. I would like to start an interactive R session using, say, 8 processors and then

Re: [R] Interpretation in cor()

2008-10-09 Thread John Kane
Please provide a small working example. It is difficult to see what you are doing from the description below. --- On Thu, 10/9/08, Michael Just [EMAIL PROTECTED] wrote: From: Michael Just [EMAIL PROTECTED] Subject: [R] Interpretation in cor() To: r-help r-help@r-project.org Received:

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread John Kane
Perhaps save the file as a csv (?write.table) and present the results in a spreadsheet or word processor table? --- On Thu, 10/9/08, Michael Just [EMAIL PROTECTED] wrote: From: Michael Just [EMAIL PROTECTED] Subject: [R] Exporting symnum() result from cor() To: r-help r-help@r-project.org

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Dirk Eddelbuettel
On 9 October 2008 at 09:18, Sean Davis wrote: | We have spent some time setting up Sun Grid Engine and OpenMPI on a | group of linux boxes. I have created a parallel environment and | everything seems to be working. I have Rmpi 0.5.5-5 installed on all | machines. I would like to start an

Re: [R] Creating a matrix

2008-10-09 Thread John Kane
?aggregate ( as Jim Holtman pointed out) is the standard way. Another way is to use the reshape package and try something like library(reshape) names(x)[3] - value cast(x, Seller + Art. ~., mean) (Note the names(x)[3] - value seems necessary at the moment as reshape only seems to work on

[R] Exporting symnum() result from cor()

2008-10-09 Thread Michael Just
Hello, I am trying to export the results from symnum() while maintain their readability. I tried using sink to text file and also copying and pasting but the results end up looking like this: symnum(c5.s) bC bED bEN bLP bLS bPA bPD bPR p bbContag 1 bbED + 1 bbENN_MN + B 1

Re: [R] Turn factors to numeric

2008-10-09 Thread Michael Kubovy
Dear R-helpers, The FAQ in question says: It may happen that when reading numeric data into R (usually, when reading in a file), they come in as factors. If f is such a factor object, you can use as.numeric(as.character(f)) to get the numbers back. More efficient, but harder to

Re: [R] Plot means with error bars - A novice needs help

2008-10-09 Thread Jim Lemon
Michael Just wrote: Thank you all for you suggestions. They are all helpful. However, I have come to a more fundamental problem. Preparing my data to even make such a graph. I thought I was ready. I will obviously need to find the n, mean, and confidence interval for my data before I can

Re: [R] Plot means with error bars - A novice needs help

2008-10-09 Thread Lawrence Hanser
Dear Colleagues, I think the allure of bargraph.CI is that it makes it easy to plot standard errors--though you still have to fiddle with the options to get the size of confidence interval you want. And there is the (strong) dislike of dynamite plots by some (the ink to info argument). Box and

[R] Error when reading a SAS transport file

2008-10-09 Thread Jean-Louis Abitbol
Dear All, I get the following error when using either SASxport or Hmisc to read an .xpt file: w - read.xport(D:/consult/Trophos/dnp/base/TRO_ds_20081006.xpt) Erreur dans factor(x, f$value, f$label) : invalid labels; length 15 should be 1 or 14 z-

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Chi Chan
On Thu, Oct 9, 2008 at 9:02 AM, Dirk Eddelbuettel [EMAIL PROTECTED] wrote: You could have a look at the slides from my UseR! 2008 tutorial [1] on 'high-performance computing with R' which covered Open MPI / Rmpi and includes examples. It may just be that you are expecting something that

[R] adjusted t-test with unequal variance

2008-10-09 Thread Bunny, lautloscrew.com
Hi all, right now i am simply comparing means. obviously this can be done by the simple t.test respectively the welch test, if var.equal is set to FALSE. just like this t.test( Y ~ group) t.test( Y ~ group, var.equal = FALSE) now that i need to compare weighted means i am using the lm

[R] Reading zipped data directly from an FTP url

2008-10-09 Thread michael watson (IAH-C)
Hi Sorry, I am clearly missing something here. I want to read this file directly: ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.gallus_gallus. zip I tried using read.table(gzfile(ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5 .txt.gallus_gallus.zip)) But I got an error:

[R] plot-parameter pch without influence when plotting a data-frame

2008-10-09 Thread Oliver Bandel
Hello, I'm plotting a data-frame and use plot(..., pch=...) as well as setting pch with par(pch=...) but always get the default symbol (circle) for the plots. Does pch have no effect, when plotting a complete data-frame, instead of certain values/vectors? How to change the behaviour?

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread Richard Cotton
Michael Just wrote: Hello, I am trying to export the results from symnum() while maintain their readability. I tried using sink to text file and also copying and pasting but the results end up looking like this: symnum(c5.s) bC bED bEN bLP bLS bPA bPD bPR p bbContag 1

Re: [R] ParallelR

2008-10-09 Thread Hesen Peng
But when I use the function makeSOCKmpi I am required to input my password to local computer, right? I haven't figured out how to do that when using a Sun Grid Engine. Do you have any suggestions? Thanks a lot. 2008/10/9 Martin Morgan [EMAIL PROTECTED]: snow can use native sockets, i.e., no

Re: [R] Error in spdep: system is computationally singular

2008-10-09 Thread Roger Bivand
Alberto Jiménez Valverde ajvalv at ku.edu writes: Hi all, I am trying to run an autologistic model using the function errorsarlm from spdep package. ... **I want to estimate the spatial simultaneous autoregressive error model** res20-errorsarlm(finalglm1, listw=nb20.w,

[R] GWR Predictions' standard deviation

2008-10-09 Thread Eduardo Marinho
Dear all, I would like to use a GWR model in order to spatially predict food insecurity in Africa. I have a georeferenced village data-bases and I've run a classic regression model (taking into account the spatial dependence of the errors) that works fairly well for Niger that is a quite

[R] vectorization instead of using loop

2008-10-09 Thread Frank Hedler
Dear all, I've sent this question 2 days ago and got response from Sarah. Thanks for that. But unfortunately, it did not really solve our problem. The main issue is that we want to use our own (manipulated) covariance matrix in the calculation of the mahalanobis distance. Does anyone know how to

Re: [R] lme and lmer df's and F-statistics again

2008-10-09 Thread Julia S.
Hi Peter, thanks a lot for your help. Very much appreciated. Cheers, Julia Peter Dalgaard wrote: Julia S. wrote: Hi there, thanks for your help. I did read Bates statement several times, and I am very glad and thankful that many statisticians spend much time on this. The problem

Re: [R] Error when reading a SAS transport file

2008-10-09 Thread Peter Dalgaard
Jean-Louis Abitbol wrote: Dear All, I get the following error when using either SASxport or Hmisc to read an .xpt file: w - read.xport(D:/consult/Trophos/dnp/base/TRO_ds_20081006.xpt) Erreur dans factor(x, f$value, f$label) : invalid labels; length 15 should be 1 or 14 z-

[R] Please help: Latent class analysis with poLCA

2008-10-09 Thread Janina_84
Dear R-experts, I am currently writing my theses about what - else but price - drives low cost carriers` buying behavior. To evaluate the collected choice-based conjoint data, I have to perform a latent class analysis. I have found the package poLCA, but somehow I don`t get the output I need...

[R] stack or dissolve matrix without double entries

2008-10-09 Thread Marten Winter
Heja, I've some bigger distance-matrices like this: num [1:3231, 1:3231] 0.000 0.176 0.176 0.176 0.176 ... - attr(*, dimnames)=List of 2 ..$ : chr [1:3231] A B C D ... ..$ : chr [1:3231] A B C D . I actually want to convert them into a 2 column dataframe like this: data.frame':

Re: [R] Strange horns on notched box plots

2008-10-09 Thread Frostygoat
Ben Bolker There's not much you can do about this. But at least I understand it now. Thank you. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] NA's in multiple choice summary table in Hmisc

2008-10-09 Thread Erich Studerus
Thank you so much. I have yet another problem that I could not resolve from the documentation. I want to get line breaks for long variable names. Here's an example: Gender-sample(c(m,f),20,replace=TRUE) Education-rnorm(20,13) label(Education)-Years of\nEducation

[R] Spatstat - Several density plots using the same scale

2008-10-09 Thread Arthur Weiss
Hi everyone, I am using the package spatstat for ploting kernel maps of my data. It is a marked point pattern, the result of mosquito surveillance in a area in a week. For each trap, the number of individuals captured is the mark of the point. plot(density(X, weights=X$marks)) makes a nice

[R] Altering the cube around a wireframe plot.

2008-10-09 Thread Todd Remund
I'm trying to create a 3D plot using wireframe with certain parts removed. I would like to get rid of the part of the outer cube that crosses over the plot leaving the back two walls and the axes. It would also be useful to put lines in the plot separate from the wireframe call. I've looked

Re: [R] vectorization instead of using loop

2008-10-09 Thread Patrick Burns
One thing that would speed it up is if you inverted 'covmat' once and then used 'inverted=TRUE' in the call to 'mahalanobis'. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Frank Hedler wrote: Dear all, I've

Re: [R] Creating GUIs for R

2008-10-09 Thread eugene dalt
Check out R-PLUS 3.3 from XLSolutions Corp. They have a GUI that you can easily expand. www.Experience-Rplus.com --- On Thu, 10/9/08, [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] wrote: From: [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] Subject: Re: [R] Creating

Re: [R] Creating GUIs for R

2008-10-09 Thread eugene dalt
Check out R-PLUS 3.3 from XLSolutions Corp. They have a GUI that you can easily expand. www.Experience-Rplus.com --- On Thu, 10/9/08, [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] wrote: From: [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] Subject: Re: [R] Creating

Re: [R] vectorization instead of using loop

2008-10-09 Thread Richard . Cotton
I've sent this question 2 days ago and got response from Sarah. Thanks for that. But unfortunately, it did not really solve our problem. The main issue is that we want to use our own (manipulated) covariance matrix in the calculation of the mahalanobis distance. Does anyone know how to

[R] Two math expressions in plot

2008-10-09 Thread Giovanni Petris
Hello! I am trying to put two math expressions in the title of a plot. As you can see below, I can place correctly one expression at a time, but not both. Ideally I would like to have them separated by a comma. Any suggestions? k - 1 n.eff - c(20, 30) ### this works plot(0,0, main =

Re: [R] ParallelR

2008-10-09 Thread Markus Schmidberger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, mpi is probably the mostly used standard for parallel computing. It was especially developed for message passing. Therefore most packages are based on MPI. Using snow you can choose between socket, mpi, pvm and (in the newest version) nws. I

Re: [R] vectorization instead of using loop

2008-10-09 Thread Richard . Cotton
Frank said: This piece of code works, but it is very slow. We were wondering if it's at all possible to somehow vectorize this function. Any help would be greatly appreciated. Richie said: You can save a substantial time by calling as.matrix before the loop Patrick said: One thing

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Markus Schmidberger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, actually there is no perfect way to use R one multiprocessors. There are two options: * using mpi: This means starting several R sessions and using MPI for the communication between the R sessions. Task distribution, fail over solutions, ...

[R] runs of heads when flipping a coin

2008-10-09 Thread Harvey
Can someone recommend a method to answer the following type of question: Suppose I have a coin with a probability hhh of coming up heads (and 1-hhh of coming up tails) I plan on flipping the coin nnn times (for example, nnn = 500) What is the expected probability or frequency of a run of rrr

Re: [R] Basic aggregate help

2008-10-09 Thread jim holtman
Is this what you want: x - data.frame(Name=c(A,A,C), Category=c(a,a,b), Quantity=c(1,2,3)) aggregate(x$Quantity, list(x$Name, x$Category), FUN=sum) Group.1 Group.2 x 1 A a 3 2 C b 3 'by' is a list of grouping elements, each as long as the variables in x. Your

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread jim holtman
You can use 'sample' and 'rle': x - sample(c(H,T), 500, replace=TRUE, prob=c(.95, .05)) as.data.frame(unclass(rle(x))) lengths values 1 12 H 21 T 3 10 H 41 T 55 H 62 T 7 26 H 81 T 9 17

[R] Dump decision trees of randomForest object

2008-10-09 Thread Christian Sturz
Hi, I'm using the package randomForest to generate a classifier for the exemplary iris data set: data(iris) iris.rf-randomForest(Species~.,iris) Is it possible to print all decision trees in the generated forest? If so, can the trees be also written to disk? What I actually need is to

Re: [R] stack or dissolve matrix without double entries

2008-10-09 Thread jim holtman
Is this what you want: x - matrix(1:16,4) rownames(x) - colnames(x) - LETTERS[1:4] x A B C D A 1 5 9 13 B 2 6 10 14 C 3 7 11 15 D 4 8 12 16 require(reshape) # create single list z - melt(x) z X1 X2 value 1 A A 1 2 B A 2 3 C A 3 4 D A 4 5 A B 5 6

[R] R/OCaml?

2008-10-09 Thread Alexy Khrabrov
Did anyone try to write R extensions in OCaml? What would it entail to enable it? Cheers, Alexy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread jgarcia
It seems to me that you are asking for: hhh - 0.1 sum(dbinom(x=0:50,size=500,prob=hhh)) [1] 0.5375688 You can use 'sample' and 'rle': x - sample(c(H,T), 500, replace=TRUE, prob=c(.95, .05)) as.data.frame(unclass(rle(x))) lengths values 1 12 H 21 T 3

Re: [R] Creating GUIs for R

2008-10-09 Thread Greg Snow
I am not involved in the RExcel project. I have just had some discussions with the people that are, so you should contact them for specific questions. I believe that this currently only works on windows, there was some mention of possibly expanding it to OpenOffice so that it would be cross

Re: [R] follow up on [Rd] NAMESPACE methods guidance, please ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html )

2008-10-09 Thread Martin Morgan
Hi Tao -- Tao Shi [EMAIL PROTECTED] writes: This is a follow-up on the discussion originally posted on the R-devel list ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html ), as I have encountered the exact same issue mentioned in Martin's email. Here is a simplified version of my

Re: [R] Dump decision trees of randomForest object

2008-10-09 Thread Liaw, Andy
See the getTree() function in the package. Also, the source package contains C code that does the prediction that you may be able to work from. Andy From: Christian Sturz Hi, I'm using the package randomForest to generate a classifier for the exemplary iris data set: data(iris)

[R] number format in plots

2008-10-09 Thread Jarek Jasiewicz
Hi It is probably simple but how to force in plot command number format: 2, 3, 4 etc. instead of 2e+04, 3e+04 etc. example of command: plot(x=data$along, y=data$rzedna,type=l, xlim=c(0,max(data$along)), ylim=c(200,1200), main=, xlab=length, ylab=height, cex.main=2, cex.lab=1.5,

Re: [R] Two math expressions in plot

2008-10-09 Thread Mark Lyman
Giovanni Petris GPetris at uark.edu writes: Hello! I am trying to put two math expressions in the title of a plot. As you can see below, I can place correctly one expression at a time, but not both. Ideally I would like to have them separated by a comma. Any suggestions? k - 1

[R] LIST HELP

2008-10-09 Thread Rajasekaramya
Hi, I have a list(A1) of dataframe and a vector containing a 22 list names. list(A1) abc l m n p q r dce e g h l k m kpo a d c also i have a vector of list names. abc,dce similarly i have 22 elements. I wanna delete or want a list without the list elements whoes name match up the vector.

[R] Plot grouped histograms

2008-10-09 Thread soeren . vogel
r11 -- r16 are variables showing a reason for usage of a product in 6 different situations. Each variable is a factor with 4 levels imported from a SPSS sav file with labels ranging from not important to very important, and NA's for a sample of N = 276. (1) I need a chi square test of

Re: [R] Two math expressions in plot

2008-10-09 Thread Gabor Grothendieck
Try bquote: plot(0, 0, main = bquote(n == .(k) * , ~ N[eff] == .(n.eff[k]))) On Thu, Oct 9, 2008 at 12:22 PM, Giovanni Petris [EMAIL PROTECTED] wrote: Hello! I am trying to put two math expressions in the title of a plot. As you can see below, I can place correctly one expression at a

[R] Help MLE

2008-10-09 Thread LFRC
Dear, I'm starting on R language. I would like some help to implement a MLE function. I wish to obtain the variables values (alpha12, w_g12, w_u12) that maximize the function LL = Y*ln(alpha12 + g*w_g12 + u*w_u12). Following the code: rm(list=ls()) ls() library(stats4) Model =

[R] R book needed

2008-10-09 Thread Hua Li
Hi there, I'm looking for advice on a R book that's for somewhat advanced user. I've been using R for a while and can do the basic analysis with no problem. My problem is that for many already existing commands, such as gsub, textconnection, list, etc, I don't use them, simply because I don't

[R] nls, lattice, and conversion over to ggplot

2008-10-09 Thread stephen sefick
I am trying to figure out how to use ggplot2. I would like to do the below with ggplot, but I can not figure out how. The data provided is a subset of a much larger data set, but these data are the data necessary to make the plot. I think I would rather have the colors become symbols, and I do

Re: [R] R book needed

2008-10-09 Thread Christos Hatzis
You might find Robert Gentleman's recent book useful for exposure on many of the more advanced features of R. http://www.bioconductor.org/pub/RBioinf/ -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hua Li Sent: Thursday, October 09,

Re: [R] LIST HELP

2008-10-09 Thread stephen sefick
could you make this reporducible- even with dummy data...? I am not sure what you want. On Thu, Oct 9, 2008 at 3:01 PM, Rajasekaramya [EMAIL PROTECTED]wrote: Hi, I have a list(A1) of dataframe and a vector containing a 22 list names. list(A1) abc l m n p q r dce e g h l k m

Re: [R] LIST HELP

2008-10-09 Thread Henrique Dallazuanna
Try this: A1 - list(abc = letters[1:3], dce = letters[4:6], kpo = letters[7:8]) v - c(abc, dce) A1[setdiff(names(A1), v)] On Thu, Oct 9, 2008 at 4:01 PM, Rajasekaramya [EMAIL PROTECTED] wrote: Hi, I have a list(A1) of dataframe and a vector containing a 22 list names. list(A1) abc l m n

Re: [R] LIST HELP

2008-10-09 Thread Jorge Ivan Velez
Dear Ramya, Try this: # Your list A=matrix(rnorm(100),ncol=10) B=matrix(rnorm(100),ncol=10) C=matrix(rnorm(100),ncol=10) colnames(A)=colnames(B)=colnames(C)=paste('X',1:10,sep=) mylist=list(A,B,C) names(mylist)=c('A','B','C') # Your name vector x=c('A','C') # Marching up! mylist[names(mylist)

[R] Binom.test, vector input

2008-10-09 Thread David Afshartous
All, Is it possible to use binom.test with vector input for only one of the arguments? I was thinking that this would possibly work with sapply but then it seems that the binom.test function would have to be re-written to supply defaults for all other arguments. set.seed(101) sim.x =

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread Michael Just
Hello John, Is it possible to write more than one data frame to a single write.csv or write.table? Thanks, Michael On Thu, Oct 9, 2008 at 8:38 AM, John Kane [EMAIL PROTECTED] wrote: Perhaps save the file as a csv (?write.table) and present the results in a spreadsheet or word processor table?

Re: [R] nls, lattice, and conversion over to ggplot

2008-10-09 Thread hadley wickham
On Thu, Oct 9, 2008 at 2:29 PM, stephen sefick [EMAIL PROTECTED] wrote: I am trying to figure out how to use ggplot2. I would like to do the below with ggplot, but I can not figure out how. The data provided is a subset of a much larger data set, but these data are the data necessary to make

Re: [R] R book needed

2008-10-09 Thread Gabor Grothendieck
It would take the size of several books to systematically list everything in R so no book could contain that. If you read one page of the R reference manual per day and when you are finished with that then read the entire reference manual of one contributed package each week then you should be

[R] Print call condensely

2008-10-09 Thread Shengqiao Li
Hello all, I want to print out call from my function. When I have a long list of arguments or long names for them, I either got mulilines using default print or big blank space using cat: foo- function(data, newdata) { call - match.call(); cat(Call:\n); print(call); cat(\nCall:\n,

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread Rolf Turner
On 10/10/2008, at 6:16 AM, Harvey wrote: Can someone recommend a method to answer the following type of question: Suppose I have a coin with a probability hhh of coming up heads (and 1-hhh of coming up tails) I plan on flipping the coin nnn times (for example, nnn = 500) What is the

Re: [R] nls, lattice, and conversion over to ggplot

2008-10-09 Thread stephen sefick
Error in `[.data.frame`(df, , var) : undefined columns selected I got this error in a fresh R session after rerunning all of the commands On Thu, Oct 9, 2008 at 3:45 PM, hadley wickham [EMAIL PROTECTED] wrote: On Thu, Oct 9, 2008 at 2:29 PM, stephen sefick [EMAIL PROTECTED] wrote: I am

Re: [R] number format in plots

2008-10-09 Thread Peter Dalgaard
Jarek Jasiewicz wrote: Hi It is probably simple but how to force in plot command number format: 2, 3, 4 etc. instead of 2e+04, 3e+04 etc. Not all that simple! It's one of those cases where you need to regain some control that you normally leave to the automatics. What you can do

[R] YALAQ - Yet Another LApply Question

2008-10-09 Thread Thompson, David (MNR)
Hello, Two lapply questions (system info and sample data below): 1) Why does the first form of command1 add the name of y _after_ the str() output rather than before as does the second (preferred) form? # command1 version1 invisible(lapply(ls(pattern='bn'), function(y) cat(y, \n,

Re: [R] Spatstat - Several density plots using the same scale

2008-10-09 Thread Rolf Turner
On 10/10/2008, at 4:48 AM, Arthur Weiss wrote: Hi everyone, I am using the package spatstat for ploting kernel maps of my data. It is a marked point pattern, the result of mosquito surveillance in a area in a week. For each trap, the number of individuals captured is the mark of the point.

Re: [R] Plot grouped histograms

2008-10-09 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: r11 -- r16 are variables showing a reason for usage of a product in 6 different situations. Each variable is a factor with 4 levels imported from a SPSS sav file with labels ranging from not important to very important, and NA's for a sample of N = 276. (1) I need a

[R] GPL and adds-on

2008-10-09 Thread robert-mcfadden
I'm wondering is it in accordance with the law, taking into account GNU GPL on which R is based, that SPSS have adds-on module that allow you to do a analysis in R. I mean commercial software use R. I guess that nobody can create R-GUI (e.g. in JAVA) on commercial rules (licensing, pricing,

Re: [R] Interpretation in cor()

2008-10-09 Thread Michael Just
From ?cor() ## Two simple vectors cor(1:10,2:11)# == 1 ## Correlation Matrix of Multivariate sample: (Cl - cor(longley)) ## Graphical Correlation Matrix: symnum(Cl) # highly correlated ## Spearman's rho and Kendall's tau symnum(clS - cor(longley, method = spearman)) symnum(clK - cor(longley,

Re: [R] Dump decision trees of randomForest object

2008-10-09 Thread Christian Sturz
I've tried the getTree() function and printed a decision tree with print(). However, it seems to me that it's hard to parse this representation and translate it into equivalent if-then-else C constructs. Are there no other ways to dump the trees into a more hierarchical form? What do you exactly

[R] nlme Random Effects Specification

2008-10-09 Thread Denney, William S.
Hello, I'm having trouble correctly specifying the random effects for a nlme model. The general summary of what I'm trying to do is that I've got a data set that has multiple individuals and multiple machines that took measurements from those individuals. At least one of the machines has drift

Re: [R] Creating GUIs for R

2008-10-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi, eugene dalt wrote: Check out R-PLUS 3.3 from XLSolutions Corp. They have a GUI that you can easily expand. www.Experience-Rplus.com Windows only? We are trying to moved out of Windows. The objective is to promote an environment that support us much environments as possible. Linux,

Re: [R] Creating GUIs for R

2008-10-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Greg, Greg Snow wrote: I am not involved in the RExcel project. I have just had some discussions with the people that are, so you should contact them for specific questions. I believe that this currently only works on windows, there was some mention of possibly expanding it to

Re: [R] Creating GUIs for R

2008-10-09 Thread Prof Brian Ripley
On Thu, 9 Oct 2008, Greg Snow wrote: I am not involved in the RExcel project. I have just had some discussions with the people that are, so you should contact them for specific questions. I believe that this currently only works on windows, there was some mention of possibly expanding it

Re: [R] Dump decision trees of randomForest object

2008-10-09 Thread Pedro.Rodriguez
Hi Chris, Maybe it is easier if you try the following C++ library http://mtv.ece.ucsb.edu/benlee/librf.html Regards, Pedro -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Sturz Sent: Thursday, October 09, 2008 4:30 PM To: Liaw, Andy;

[R] Bug in ifelse

2008-10-09 Thread Daniel Malter
Hi all, I am quite sure it's not a bug, but I am going nuts about this. I do not possibly understand why I get different results for b1 and b2 as shown below. x=c(183,191,192,193,195,206,207,209,210,211,212,213,214,217,218,221,222,223, 224,225,227,228,229,230) y=c(221,225,228,241,242)

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread Carl Witthoft
IIRC this is a standard problem in digital communications theory, so you might want to look for literature in that arena. Carl Can someone recommend a method to answer the following type of question: Suppose I have a coin with a probability hhh of coming up heads (and 1-hhh of coming up

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread Michael Just
Richard, Thanks this works well. -Michael Just On Thu, Oct 9, 2008 at 2:43 PM, Michael Just [EMAIL PROTECTED] wrote: Hello John, Is it possible to write more than one data frame to a single write.csv or write.table? Thanks, Michael On Thu, Oct 9, 2008 at 8:38 AM, John Kane [EMAIL

Re: [R] Bug in ifelse

2008-10-09 Thread Rolf Turner
On 10/10/2008, at 10:33 AM, Daniel Malter wrote: Hi all, I am quite sure it's not a bug, but I am going nuts about this. I do not possibly understand why I get different results for b1 and b2 as shown below. x=c (183,191,192,193,195,206,207,209,210,211,212,213,214,217,218,221,222,2 23,

Re: [R] Bug in ifelse

2008-10-09 Thread Daniel Malter
I just gave up a second too early: It does not work with ifelse(...) as ifelse(...) assigns only a singley value (the first in the vector). A regular if(...) else ... condition works, however. Daniel Malter wrote: Hi all, I am quite sure it's not a bug, but I am going nuts about this. I do

[R] Write multiple objects / data frames into a single .csv -- write.csv

2008-10-09 Thread Michael Just
Hello, Is there a way to put multiple data.frames or objects into a single .csv ? I know I can use sink() to do this for a text file. Is there way to do it for a .csv? e.g. for sink() sink(c5.k.s.p.92.LN.sl.vs.mean.txt) symnum(c5.k.92.LN.sl.vs.mean) symnum(c5.s.92.LN.sl.vs.mean)

  1   2   >