Re: [R] pdf creation error

2008-10-22 Thread Martin Maechler
SK == Stephan Kolassa [EMAIL PROTECTED] on Tue, 21 Oct 2008 21:28:09 +0200 writes: SK Hi JD, do you have the pdf open in some app, e.g., SK Acrobat Reader? If the file is open, R can't write on SK it. My (German) errors in this case look like yours: SK Fehler in

Re: [R] R v.2.7.1

2008-10-22 Thread Uwe Ligges
Santosh wrote: Dear R users, I am recently faced with a problem of insufficient memory due to resizing... or something similar. This happens when I try to plot several plots.. Earlier I used to plot 50+ plots (50 windows) without any problems. Now, I can't plot more than 15 odd plots(15

Re: [R] pdf creation error

2008-10-22 Thread Dr Eberhard Lisse
Same with the Mac, in fact, Skim (and others) can be made to notice changes and reload the PDF when necesary. greetings, el on 10/22/08 9:28 AM Martin Maechler said the following: SK == Stephan Kolassa [EMAIL PROTECTED] on Tue, 21 Oct 2008 21:28:09 +0200 writes: SK Hi JD, do you

Re: [R] aggregating along bins and bin-quantiles

2008-10-22 Thread Ivan Alves
Dear Mark and all interested, Unfortunately the code provided by Mark does not work - there is a syntax error when run as provided. I looked at possibly solving the problem, but without much knowledge of the output of split (looks like a list of lists, and not a list of data frames), it is

[R] Problem in Cart

2008-10-22 Thread Rahul-A.Agarwal
Hi, Can some one help me in this project. I would like to initiate a project using CART. For example for NIFTY 50 stocks the first node could be cheap or expensive based on PE (Price Earning) with 2 subsequent nodes for earnings certainty and return on assets. Can anyone tell me how to go

Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread Tru Huynh
On Wed, Oct 22, 2008 at 04:51:13AM -0200, Bernardo Rangel Tura wrote: Em Ter, 2008-10-21 às 15:36 +0100, Paulo Cortez escreveu: Hi, While in MacOS it is quite simple to install R and Java packages, the same is not true for Linux. I surfed the web and it seems that other users also

[R] Error in read.mzXML

2008-10-22 Thread Minwook Kim
I got the error when I tried to read mzxml by using caMassClass. msc.rawMS.read.mzXML(a.mzXML) Error in .classEnv(thisClass) : unable to find an environment containing class XMLNamespaceDefinitions How can I fix it? my environment in R is R 2.7.2 GUI 1.25(5217) Mac OS X 10.5.5

Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread Martyn Plummer
On Tue, 2008-10-21 at 15:36 +0100, Paulo Cortez wrote: Hi, While in MacOS it is quite simple to install R and Java packages, the same is not true for Linux. I surfed the web and it seems that other users also have similar problems. Perhaps a nice FAQ answer or HOWTO would help... But

[R] Nagelkerke R square for Prediction data

2008-10-22 Thread Tobias Erik Reiners
Dear Helpers, I tries to find an Package or script which deals with Nagelkerke R square. I got Prediction data from Habitatmodels for an animal. Some researchers use the the Nagelkerke R Square to confirm the Goodness of model. I would like to do this as well. Data: 1 0.9847 1 0,7653 ... 0

Re: [R] pdf creation error

2008-10-22 Thread Duncan Murdoch
Martin Maechler wrote: SK == Stephan Kolassa [EMAIL PROTECTED] on Tue, 21 Oct 2008 21:28:09 +0200 writes: SK Hi JD, do you have the pdf open in some app, e.g., SK Acrobat Reader? If the file is open, R can't write on SK it. My (German) errors in this case look like

Re: [R] Nagelkerke R square for Prediction data

2008-10-22 Thread Chuck Cleland
On 10/22/2008 6:05 AM, Tobias Erik Reiners wrote: Dear Helpers, I tries to find an Package or script which deals with Nagelkerke R square. I got Prediction data from Habitatmodels for an animal. Some researchers use the the Nagelkerke R Square to confirm the Goodness of model. I would like

[R] Creating list from matrix

2008-10-22 Thread Ron Michael
Hello everyone,   I have a matrix like :   mat - matrix(rnorm(12*3), 3)   Now I want to break that matrix in 4 parts each of them are matrix of (3x3) and put those 4 matrices in a list object of length 4   Can anyone please tell me how to do that? Get your new Email address! Grab the

Re: [R] Creating list from matrix

2008-10-22 Thread Henrique Dallazuanna
Try this: lapply(split(as.data.frame(t(mat)), rep(1:(ncol(mat)/3), each = 3)), t) On Wed, Oct 22, 2008 at 8:56 AM, Ron Michael [EMAIL PROTECTED]wrote: Hello everyone,  I have a matrix like :  mat - matrix(rnorm(12*3), 3)  Now I want to break that matrix in 4 parts each of them are

[R] torque/psb snow library

2008-10-22 Thread jgarcia
Hello all; I'm trying to execute parallel jobs trough library snow on a cluster built through torque/PSB. I'm succesfully obtaining the cluster with: system(cat $PBS_NODEFILE cluster.txt) mycluster - scan(file=cluster.txt,what=character) cl - makeSOCKcluster(mycluster) The only problem, at the

Re: [R] Creating list from matrix

2008-10-22 Thread Dimitris Rizopoulos
try this: mat - matrix(rnorm(12*3), 3) n - nrow(mat) p - ncol(mat) ind - rep(1:4, each = n*p/4) lapply(split(mat, ind), matrix, nrow = n) I hope it helps. Best, Dimitris Ron Michael wrote: Hello everyone,  I have a matrix like :  mat - matrix(rnorm(12*3), 3)  Now I want to break

Re: [R] weighted quantiles

2008-10-22 Thread Norbert NEUWIRTH
Dear Frank, Thank you for your usefull package Hmisc! I use it in my microsimulation project every day. But now a problem arose ... Having updated to R 2.8.0 (under windows XP) your library Hmisc isn't installed any more. Trying to reinstal I recognized, that it isn't even in the package

[R] Weibull parameter estimation

2008-10-22 Thread Borja Soto Varela
Dear R-users I would like to fit weibull parameters using Method of moments in order to provide the inital values of the parameter to de function 'fitdistr' . I don`t have much experience with maths and I don't know how to do it. Can anyone please put me in the rigth direction? Borja

[R] mgcv pack- gam() - question about the by argument

2008-10-22 Thread Gustaf Granath
R fellows, I hope my questions are not too much about statistical methodology. I do lab experiments where y is measured at different x, using (plant)material originating from different sites (2-4). The response is non-linear in a way that I have turned to gam() (mgcv package) to investigate

Re: [R] Error in read.mzXML

2008-10-22 Thread Duncan Temple Lang
Minwook Kim wrote: I got the error when I tried to read mzxml by using caMassClass. msc.rawMS.read.mzXML(a.mzXML) Error in .classEnv(thisClass) : unable to find an environment containing class XMLNamespaceDefinitions How can I fix it? Either upgrade to R 2.8.0 or install version

[R] Spatstat help - quadratcount query

2008-10-22 Thread Gough Lauren
Hi all, I am using quadratcount in spatstat to divide a window containing a point pattern into a grid of quadrats containing the intensity of points in each quadrat. My data is in UTM co-ordinates. My window is defined as follows:

Re: [R] Nagelkerke R square for Prediction data

2008-10-22 Thread Frank E Harrell Jr
Chuck Cleland wrote: On 10/22/2008 6:05 AM, Tobias Erik Reiners wrote: Dear Helpers, I tries to find an Package or script which deals with Nagelkerke R square. I got Prediction data from Habitatmodels for an animal. Some researchers use the the Nagelkerke R Square to confirm the Goodness of

[R] Confidence intervals for the NPMLE of a survival function with interval censored data

2008-10-22 Thread LANGOHR, KLAUS
Dear R users, I have found several functions in the Icens package (such as EM, EMICM et al.) as well as the function prodlim of the prodlim-package to compute the NPMLE of a variable's survival function with interval-censored data. However, I haven't found out, whether it is possible to also

Re: [R] Problem in Cart

2008-10-22 Thread Bert Gunter
CART is a commercial package and not part of R. R has several packages that do various kinds of regression and classification trees. Try: RSiteSearch(Classification Tree,restr=func) -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL

Re: [R] Error in read.mzXML

2008-10-22 Thread Minwook Kim
Thanks. upgrading of XML package to 1.96 is helpful. Minwook - Original Message From: Duncan Temple Lang [EMAIL PROTECTED] To: Minwook Kim [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Wednesday, October 22, 2008 3:20:21 PM Subject: Re: [R] Error in read.mzXML Minwook Kim

[R] ad.test exponential distribution

2008-10-22 Thread eric lee
Hi, I'm trying to use ad.test or ad2.test to test whether a given data set is exponential. I see that one of the function inputs is distn, but I try exponential and 5 other variants, but I still get the error message: ad.test(test2, distn=exponential, fit=list(estimate = 0.167685), H=NA,

Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard Lisse
gpg: requesting key E2A11821 from hkp server subkeys.pgp.net gpg: key E2A11821: public key Vincent Goulet [EMAIL PROTECTED] imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 on 10/22/08 3:42 PM Renaud Gaujoux said the following: Hi, I

Re: [R] A matrix automation problem

2008-10-22 Thread Ben Bolker
megh megh74 at yahoo.com writes: [I am really sorry if it is double posted, I doubt me previous post could not reach forum due to some problem with net] Suppose I have a matrix : a = matrix(1:9, 3) From this matrix, I construct 9 additional matrices : i = 1:9 bi = a * i

[R] getting the name of an object

2008-10-22 Thread francois Guilhaumon
Hello, I'm looking for a way to get the name of an object when it is used within an sapply. More precisely, with a simple example : I have a named list of objects : myList = list(a=rnorm(10),b=rnorm(10),c=rnorm(10)) I would like to create a new object from each of the components of myList

Re: [R] GPG key not found

2008-10-22 Thread Renaud Gaujoux
Hi, well... that is what I would like to see indeed. :( But I keep getting my error, what's bothering me is that the web-based tools also does not find the key... Did you also try on http://keyserver.noreply.org/? thanks Dr Eberhard Lisse wrote: gpg: requesting key E2A11821 from hkp server

[R] suboptimal lp solutions

2008-10-22 Thread Selwyn McCracken
Hi list, I want to find the total maximum resources I can spend given a set allocation proportion and some simple budget constraints. However, I get suboptimal results via lp and friends (i.e. lpSolve and simplex in the linprog and boot) . For example: library(lpSolve) proportions = c( 0.46,

[R] GPG key not found

2008-10-22 Thread Renaud Gaujoux
Hi, I tried to install R 2.8 on Ubuntu Hardy via the Ubuntu mirroed repository. I tried to import the GPG key with: gpg --keyserver subkeys.pgp.net --recv-key E2A11821 but get the following error: gpg: requesting key E2A11821 from hkp server subkeys.pgp.net gpgkeys: key E2A11821 not found on

Re: [R] getting the name of an object

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 10:02 AM, francois Guilhaumon wrote: Hello, I'm looking for a way to get the name of an object when it is used within an sapply. More precisely, with a simple example : I have a named list of objects : myList = list(a=rnorm(10),b=rnorm(10),c=rnorm(10)) I would like to create a

[R] SVM, feature selection and parameter tuning

2008-10-22 Thread Stefan Koenig
Hi, Does anyone know why the package MCRestimate is not part of the BioConductor 2.2 anymore? I am looking for package doing support vector machine analyses including (i) variable/feature selection and (ii) parameter tuning in one learning period. Many thanks, Stefan --

Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard Lisse
No, I did gpg --keyserver subkeys.pgp.net --recv-key E2A11821 I am getting broken packages unmet dependencies, but maybe it'll take a while for everything to propagate :-)-O el on 10/22/08 4:31 PM Renaud Gaujoux said the following: Hi, well... that is what I would like to see indeed. :(

[R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Mitchell Maltenfort
The impression I get from the list and the references I've perused is that nlme is being phased out in favor of lme4, but lme4 still doesn't have a complete feature set yet. What I'm still fuzzy on, being a relative R newbie, is: (a) what features in nlme are currently missing in lme4 (b) what's

Re: [R] getting the name of an object

2008-10-22 Thread hadley wickham
On Wed, Oct 22, 2008 at 9:34 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/22/2008 10:02 AM, francois Guilhaumon wrote: Hello, I'm looking for a way to get the name of an object when it is used within an sapply. More precisely, with a simple example : I have a named list of objects :

Re: [R] GPG key not found

2008-10-22 Thread Renaud Gaujoux
All right, I'll wait and see then. Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] Problem in Cart

2008-10-22 Thread Rahul-A.Agarwal
Hi, Sorry for the confusion but I am looking to use R for regression trees. My query is stated below and I am not able to understand how can I use tree library in this case Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyderabad On Net: 19 533 6363 -Original

Re: [R] GPG key not found

2008-10-22 Thread Martyn Plummer
Have you tried other keys? (mine is 97D3544E if you want to try). If nothing works then it is probably a firewall problem. Ask your network administrator if port 11371 is blocked. When I had this problem, neither gpg --recv-keys nor the web interface at wwwkeys.pgp.net worked for me. Martyn On

[R] working with ROracle

2008-10-22 Thread sreejithpadmanabhan
Dear all, I am new to this stuff. I need to fetch certain values from the database and crate a curve fitting for the same using ROracle. I would like to know how to work with R for that. I have been able to do something with the code attached with this post. If anyone can help me in this regards,

[R] Package survey

2008-10-22 Thread Rita Sousa
Hi, I’m using the svyby for total statistics, for example: svyby(~p_igov,~div_a,desenho_nps,svytotal,drop.empty.groups=TRUE,vartype =c(se,var,cvpct)) In the numerical variable p_igov (and others) I have many non responses but if I maintain the NA it doesn’t work.

Re: [R] GPG key not found [solved]

2008-10-22 Thread Renaud Gaujoux
It is solved. The query on http://keyserver.noreply.org/ with the key (E2A11821) does not work but typing Vincent Goulet works fine... Thanks a lot Martyn Plummer wrote: Have you tried other keys? (mine is 97D3544E if you want to try). If nothing works then it is probably a firewall problem.

Re: [R] R Help

2008-10-22 Thread Boyce, Morgan
Thank you. This was very helpful. -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2008 6:22 PM To: Boyce, Morgan Cc: R-help@r-project.org Subject: Re: [R] R Help You can't mix character and numeric in a zoo object. Also note that lag.zoo

[R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Dear all, I searched the mail archives and the R site and found no guidance (tried merge, cbind and terms like coalesce with no success). There surely is a way to coalesce (like in SQL) columns in a dataframe, right? For example, I would like to go from a dataframe with two columns to

[R] suboptimal lp solutions

2008-10-22 Thread Selwyn McCracken
Hi list, I want to find the total maximum resources I can spend given a set allocation proportion and some simple budget constraints. However, I get suboptimal results via lp and friends (i.e. lpSolve and simplex in the linprog and boot) . For example: library(lpSolve) proportions = c( 0.46,

Re: [R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Mitchell Maltenfort
Bert, you've been very helpful. It sounds like for my meagre needs, nlme is what I should stick with. However, I'll wait for Bates to weigh in on the pros and cons of each. Thanks! On Wed, Oct 22, 2008 at 11:23 AM, Bert Gunter [EMAIL PROTECTED] wrote: Doug Bates is the authority of course,

Re: [R] suboptimal lp solutions

2008-10-22 Thread Peter Dalgaard
Selwyn McCracken wrote: Hi list, I want to find the total maximum resources I can spend given a set allocation proportion and some simple budget constraints. However, I get suboptimal results via lp and friends (i.e. lpSolve and simplex in the linprog and boot) . For example:

[R] Saving kruskal wallis p-values

2008-10-22 Thread lave0083
Hi everyone, I am working on analyzing spectra which requires hundreds of kruskal wallis tests to be performed. Once significant results are found post tests are performed ect. My questions are: how do I perform all these kw tests and save just the pvalues in a table? Is there anyway to have

Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread Paulo Cortez
Thanks for the many answers I received. This is becoming a nightmare and I am concluding that installing java1.6 in CentOS5 is particularly hard, specially if you installed previous jdk versions... I tryed a wide range of solutions. I resume some of them: 1) Tryed to reinstall jdk1.6 and

Re: [R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Bert Gunter
Doug Bates is the authority of course, but perhaps a couple of quick inline comments may suffice: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mitchell Maltenfort Sent: Wednesday, October 22, 2008 7:41 AM To: r-help@r-project.org Subject: [R] Think I'm

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Erik Iverson
Not tested, but for data.frame 'df', try df$coal - ifelse(!is.na(df$Name.x), df$Name.x, df$Name.y) But see the help page for 'ifelse' regarding issues with classes, and the myriad R-help posts on the 'ifelse' function. Erik Ivan Alves wrote: Dear all, I searched the mail archives and the

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 11:21 AM, Ivan Alves wrote: Dear all, I searched the mail archives and the R site and found no guidance (tried merge, cbind and terms like coalesce with no success). There surely is a way to coalesce (like in SQL) columns in a dataframe, right? For example, I would like to

Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread Martyn Plummer
Well this is interesting. I have a working java setup (using OpenJDK). But I can break it by running R CMD javareconf -e. This command exports a number of JAVA_* environment variables. The rJava configure script uses these instead of querying R, but the compilation then fails. It seems that the

Re: [R] card games

2008-10-22 Thread Greg Snow
Why do you want this? To play during a break? Or to demonstrate probabilities? Or to simulate games using different strategies? There are some functions with names like card.game in the kappalab package, but they don't look like they do the type of card game you play. If you just want to

[R] Problem about spawn nodes with Rmpi

2008-10-22 Thread Marce
Hi all, now I'm testing R in a virtual cluster, made it with VirtualBox. This one has 3 nodes, running CentOS 5 and OpenMPI 1.2.8, and the principal node (called server) exports the /home to other nodes. I have installed R and OpenMPI in /home, in fact, it seems work OK. Editing the

Re: [R] getting the name of an object

2008-10-22 Thread Peter Dalgaard
hadley wickham wrote: On Wed, Oct 22, 2008 at 9:34 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/22/2008 10:02 AM, francois Guilhaumon wrote: Hello, I'm looking for a way to get the name of an object when it is used within an sapply. More precisely, with a simple example :

Re: [R] torque/psb snow library

2008-10-22 Thread Markus Schmidberger
Hi Javier, there is a new mailing list for R and HPC: [EMAIL PROTECTED] This is probably a better list for your question. I never tried torque with socket. We use torque and mpi or pvm (and R) and it is working very well. Why do you use socket as communication layer? MPI was especially developed

Re: [R] Problem about spawn nodes with Rmpi

2008-10-22 Thread Markus Schmidberger
Hi Marce, there is a new mailing list for R and HPC: [EMAIL PROTECTED] This is probably a better list for your question. Probably Rmpi does not find the correct Rmpi implementation. Have you installed a second mpi implementation (lammpi)? How do you have installed Rmpi? Did you compiled it to

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Dear all, Thanks for all the replies. I get something with Duncan's code (slightly more compact than the other two), but of class integer, whereas the two inputs are class factor. Clearly the name information is lost. I did not see anything on this in the help page for ifelse. On this

Re: [R] torque/psb snow library

2008-10-22 Thread jgarcia
Thanks you! I'll look at this new list! Well, I'm not the system administrator, and my installation of Rmpi and/or pvm libraries for R crashes. As this is the first time I parallelize some jobs, snow appealed as a first approach because 1) it compiled correctly and 2) the use of the library is

Re: [R] A matrix automation problem

2008-10-22 Thread Greg Snow
Does this help point you in a useful direction? a - matrix(1:9, 3) * 10 b - matrix(1:9, 3) kronecker(b,a) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard W Lisse
subkeys.pgp.net has 6 IP addresses, but all of them seem to have the key now. el On 22 Oct 2008, at 17:05 , Martyn Plummer wrote: Have you tried other keys? (mine is 97D3544E if you want to try). If nothing works then it is probably a firewall problem. Ask your network administrator if port

Re: [R] torque/psb snow library

2008-10-22 Thread Luke Tierney
You may or may not see speed substantial improvements using Rmpi with (or without) snow but you might -- depends on how the cluster is configured, what version of MPI, etc. In my experience using snow with sockets, pvm, or LAM/MPI for typical computations running an a multi-core machine vs

Re: [R] Complex Numbers and Bayesian Statistical Modelling.

2008-10-22 Thread Ben Bolker
Marcus Vinicius mvinic at gmail.com writes: Dear all, Is there anyone that may help me to use complex numbers and Bayesian Statistical Modelling? Thanks a lot. Best regards. Marcus Vinicius This is a very vague question with little clear connection to R. R has lots of capabilities

[R] Change background color in script window in Windows Rgui

2008-10-22 Thread Greg Snow
Does anyone know how to change the background color of the script window(s) in Rgui on Windows? I can use the Gui Preferences menu item under the Edit menu has an option that lets you change the background color for the console window and any help/info windows that pop up, but the script

[R] Mirror/Package problems in R 2.8.0

2008-10-22 Thread M-J Milloy
Hello all, I've searched the lists and the web and not found an obvious answer to this; my apologies if I'm overlooking something. I've used 2.6.x for awhile; this morning, after installing 2.8.0 on my Mac OS X 10.5.5 machine, neither install.packages nor the Packages Data/Package

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 12:09 PM, Ivan Alves wrote: Dear all, Thanks for all the replies. I get something with Duncan's code (slightly more compact than the other two), but of class integer, whereas the two inputs are class factor. Clearly the name information is lost. I did not see anything on

[R] Calculating confidence limits for the difference between means

2008-10-22 Thread Dennis Fisher
Colleagues, I am working on a problem at the edge of my knowledge of statistics. Basically, I have values for two groups - I am trying to calculate the 90% confidence limits for the difference between means. I can implement this without difficulty based on standard equations that are

Re: [R] Saving kruskal wallis p-values

2008-10-22 Thread Greg Snow
Those are the results that print, not what you get. Try saving the results of the test in an object, then examine the saved object with the str function. Then reread the section in An Introduction to R on extracting pieces of lists. A reread of the help page for kruskal.test, specifically

Re: [R] Change background color in script window in Windows Rgui

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 12:52 PM, Greg Snow wrote: Does anyone know how to change the background color of the script window(s) in Rgui on Windows? I can use the Gui Preferences menu item under the Edit menu has an option that lets you change the background color for the console window and any help/info

Re: [R] Weibull parameter estimation

2008-10-22 Thread Göran Broström
On Wed, Oct 22, 2008 at 1:57 PM, Borja Soto Varela [EMAIL PROTECTED] wrote: Dear R-users I would like to fit weibull parameters using Method of moments in order to provide the inital values of the parameter to de function 'fitdistr' . I don`t have much experience with maths and I don't know

Re: [R] Calculating confidence limits for the difference between

2008-10-22 Thread Ted Harding
On 22-Oct-08 17:09:27, Dennis Fisher wrote: Colleagues, I am working on a problem at the edge of my knowledge of statistics. Basically, I have values for two groups - I am trying to calculate the 90% confidence limits for the difference between means. I can implement this without

[R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Werner Wernersen
Hi, this is probably a very trivial question but I can't figure out the right terms to find the solution in the list archive. I have a matrix or a data.frame or the like: m - matrix(ncol=3,seq(1,9)) m [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 and now I

Re: [R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Werner Wernersen
I thought I've tried this already and that it doesn't work -- madness. Anyway, Jeff kindly sent me the solution: m[cbind(c(1,2,3),c(1,3,1))] does the trick. Thanks, Werner Hi, this is probably a very trivial question but I can't figure out the right terms to find the solution in the

Re: [R] Inserting blank lines into a file

2008-10-22 Thread Greg Snow
There is a basic interface to gnuplot in the TeachingDemos package (see the help on gp.open), but it does not do surface plots (yet, I am working on that). One way to create the datafile with gaps is: tmp - 'nameofdatafile.txt' tmp2 - data.frame(x=x, y=y, z=z) tmp2 -

Re: [R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Greg Snow
Subscript using a 2 column matrix with the rows in the first column and the cols in the 2nd column, e.g.: x - matrix(1:9, 3) x[ cbind( c(1,2,3), c(3,2,1) ) ] [1] 7 5 3 Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED]

Re: [R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Werner Wernersen
Many thanks, Greg! Now I know why I thought that this does not work: I probably tried it with the string names of the columns and rows instead of their numbers. The former does not work (I think). Thanks to all again! Werner - Ursprüngliche Mail Von: Greg Snow [EMAIL PROTECTED]

[R] Calculate individual R2n values

2008-10-22 Thread T.D.Rudolph
Does anyone know an alternate way of calculating R2n with spatial data other than converting values into ltraj format (adehabitat package)? I have a series of geographic xy coordinates (in metres). I imagine I can subtract x1y1 from x2y2 to get the spatial difference (dxdy), but what function

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Julian Burgos
You could do something like this: Name.x=c('nx1','nx2',NA,NA) Name.y=c('ny1','NA','ny3',NA) Name=Name.x Name[is.na(Name.x)]=Name.y[is.na(Name.x)] Name [1] nx1 nx2 ny3 NA Julian Ivan Alves wrote: Dear all, I searched the mail archives and the R site and found no guidance (tried

[R] 3-D (surface) B-splines

2008-10-22 Thread Wang, Zhaoming (NIH/NCI) [C]
Hello Is there any R package which can do 3-D splines (reconstruct a surface based 3-D data input) ? Thanks, Zhaoming __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] forward stepwise regression using Mallows Cp

2008-10-22 Thread Essers, Jonah
So I recognize that: 1. many people hate forward stepwise regression (i've read the archives)--but I need it 2. step() or stepAIC are two ways to get a stepwise regression in R But here's the thing: I can't seem to figure out how to specify that I want the criteria to be Mallow's Cp (and

[R] Help with functions

2008-10-22 Thread Alex99
Hi there, I have a the following function which takes a name(fname), total number of rows (Total), number of times to make a sample(nSample), number of records/rows to be included in each sample(nPatient). then it generates required samples and calculates the mean and standard deviation of the

Re: [R] code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?

2008-10-22 Thread Natalie O'Toole
Hi Yihui, Thank-you for this information. This is the code I am entering into RWeb after loading my data file: #subset the file to only include certain values: test-subset(X, GRADE == 7 Y_Q10A 9) #sort the data by province and the variable Y_Q10A mydata-test mydataSorted-mydata[

[R] Question about R graphs

2008-10-22 Thread legendy
Hello all, I have a question about CODA. Using my R code as bellow, I drew two graphs (the data comes from the example of the speed of light in the Gelman’s book “Bayesian Data Analysis (Second edition)” (page 77)). My R code is: library(R2WinBUGS) y=c(28, 26, 33, 24, 34, -44, 27, 16, 40,

Re: [R] Problem about spawn nodes with Rmpi

2008-10-22 Thread Marce
2008/10/22 Markus Schmidberger [EMAIL PROTECTED] Hi Marce, there is a new mailing list for R and HPC: [EMAIL PROTECTED] This is probably a better list for your question. Probably Rmpi does not find the correct Rmpi implementation. Have you installed a second mpi implementation (lammpi)?

Re: [R] Change background color in script window in Windows Rgui

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 12:52 PM, Greg Snow wrote: Does anyone know how to change the background color of the script window(s) in Rgui on Windows? I can use the Gui Preferences menu item under the Edit menu has an option that lets you change the background color for the console window and any help/info

Re: [R] Package survey

2008-10-22 Thread Thomas Lumley
I think this has already been fixed in version 3.9-1. Also, you probably want to add na.rm=TRUE to the call svyby(~p_igov,~div_a,desenho_nps,svytotal,drop.empty.groups=TRUE,vartype =c(se,var,cvpct), na.rm=TRUE) otherwise the estimated total will be NA whenever any observation is NA.

[R] optim bug/help?

2008-10-22 Thread rkevinburton
In the documentation for 'optim' it gives the following function: fr - function(x) { ## Rosenbrock Banana function x1 - x[1] x2 - x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } optim(c(-1.2,1), fr) When I run this code I get: $par [1] 1.000260 1.000506 I am sure I am missing

Re: [R] Help with functions

2008-10-22 Thread Sarah Goslee
Hi, A repeatable example with data would help, as that way we could see what was happening. sampling=function(fname,Total,nSample,nPatient){ trans=t(A) What's A? It isn't one of the arguments to your function. And what's the transpose of a non-existent thing? You may well have it in your

Re: [R] Help with functions

2008-10-22 Thread jim holtman
It might be your return statement. Look up 'return' in the help file and you will see that you can only return a single value. If you want multiple values returned, use a list: return(listGmean,Gsd)) On Wed, Oct 22, 2008 at 11:53 AM, Alex99 [EMAIL PROTECTED] wrote: Hi there, I have a the

[R] help wiht contrasts for GLM

2008-10-22 Thread Susana Zuloaga
Hi I conducted a binomial GLM (with 3-factor) but I need to make a contrasts test between the averages of the treatments; I need know what treatment are equal. I know that the contrasts are used only in ANOVA I suppose that is incorrect doing this in a glm, there is some way to make contrasts

[R] lme4 question

2008-10-22 Thread Lawrence Hanser
Dear R Colleagues, I run the following two models: mod1 - lmer(y ~ category + subcomp + (1 | id)) mod2 - lmer(y ~ category + subcomp + category*subcomp + (1 | id) where: category has 4 possible values subcomp has 24 possible values id has approx 120 values (id is nested within category, and in

Re: [R] optim bug/help?

2008-10-22 Thread Ben Bolker
rkevinburton at charter.net writes: In the documentation for 'optim' it gives the following function: fr - function(x) { ## Rosenbrock Banana function x1 - x[1] x2 - x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } optim(c(-1.2,1), fr) When I run this code I get: $par

Re: [R] lme4 question

2008-10-22 Thread Douglas Bates
On Wed, Oct 22, 2008 at 4:18 PM, Lawrence Hanser [EMAIL PROTECTED] wrote: Dear R Colleagues, I run the following two models: mod1 - lmer(y ~ category + subcomp + (1 | id)) mod2 - lmer(y ~ category + subcomp + category*subcomp + (1 | id) where: category has 4 possible values subcomp has

Re: [R] lme4 question

2008-10-22 Thread Lawrence Hanser
Re Doug's comment: I apologize for being incomplete--I do know better. I did explicitly include a data statement in the models, but didn't write the model statements properly in my post. Here are the actual model statements: mod1 - lmer(y ~ category + subcomp + (1 | id), data=prepchiefs08rm)

[R] forecasting earnings, sales and gross margin of a company...

2008-10-22 Thread Michael
Hi all, I am playing with some companies' balance sheets and income statements and want to apply what I've just learned from Stats class to see if I can forecast the companies earnings, sales and gross margin in the short term (3rd and 4th Quarter), mid-term (2009) and long term (2011, etc. ) I

Re: [R] forward stepwise regression using Mallows Cp

2008-10-22 Thread Frank E Harrell Jr
Essers, Jonah wrote: So I recognize that: 1. many people hate forward stepwise regression (i've read the archives)--but I need it Why? -Frank 2. step() or stepAIC are two ways to get a stepwise regression in R But here's the thing: I can't seem to figure out how to specify that I want

[R] plotting matrix

2008-10-22 Thread stephen sefick
a - c(1:26) b - rnorm(25) e - rnorm(25) f - rnorm(25) g - data.frame(b,e, a,f) I would like to plot a agianst all possibilities and then shoot it out to a pdf one graph per page. I think it would be okay to have this as a lattice plot or a ggplot with many graphs per page. I can figure all of

Re: [R] plotting matrix

2008-10-22 Thread stephen sefick
#sorry lets try that agian here is data that should work a - c(1:26) b - rnorm(26) e - rnorm(26) f - rnorm(26) g - data.frame(b,e, a,f) On Wed, Oct 22, 2008 at 6:35 PM, stephen sefick [EMAIL PROTECTED] wrote: a - c(1:26) b - rnorm(25) e - rnorm(25) f - rnorm(25) g - data.frame(b,e, a,f) I

Re: [R] card games

2008-10-22 Thread Erin Hodgess
This is for programming purposes. I wanted my students to do some games, but I wanted to see if there were items already out there. Thanks, Erin On Wed, Oct 22, 2008 at 10:39 AM, Greg Snow [EMAIL PROTECTED] wrote: Why do you want this? To play during a break? Or to demonstrate

  1   2   >