[R] Odp: SLR 500 Random Samples

2010-02-15 Thread Petr PIKAL
Hi seems to me like a homework for bootstraping see ?boot, ?lm, ?confint If not, some code how you tried to solve it yourself and how it did not worked as expected would be greatly appreciated. Regards Petr r-help-boun...@r-project.org napsal dne 15.02.2010 05:41:14: > > Consider the SLR

Re: [R] Separating columns, and sorting by rows

2010-02-15 Thread Gabor Grothendieck
Try this: Lines <- "-mm Rainfall(mm) 1 1977-0217.4 2 1977-0334.0 3 1977-0426.2 4 1977-0542.6 5 1977-0658.6 6 1977-0723.2 7 1977-0826.8 8 1977-0948.4 9 1977-1047.0 10 1977-1137.2 11 1977-

Re: [R] Lattice: How to implement "varwidth" analogous to "graphics::boxplot" in "bwplot"?

2010-02-15 Thread Johannes Graumann
Johannes Graumann wrote: > Has anybody solved this? For the benefit of others: after studying > ?panel.bwplot I have to admit that > bwplot(..., varwidth = TRUE) solves the issue. It's just not documented at > ?bwplot Cheers, Joh

Re: [R] Lattice: How to implement "varwidth" analogous to "graphics::boxplot" in "bwplot"?

2010-02-15 Thread Deepayan Sarkar
On Mon, Feb 15, 2010 at 1:56 PM, Johannes Graumann wrote: > Johannes Graumann wrote: > >> Has anybody solved this? > > For the benefit of others: after studying >        > ?panel.bwplot > I have to admit that >        > bwplot(..., varwidth = TRUE) > solves the issue. It's just not documented at >

Re: [R] mgcv problem

2010-02-15 Thread Simon Wood
I think that you have somehow initialised .Random.seed to be a list. Try removing it (i.e. 'rm(.Random.seed)') and load the packages again. best, Simon On Friday 12 February 2010 21:31, Rosa Manrique wrote: > My dearest, > > I appreciate very much a little help. I have changed my R 2.9 version

[R] R-Commander plug-in difficulties

2010-02-15 Thread AC Del Re
Hi All, I have recently created an Rcmdr plugin package and it passed all the checks and was uploaded to CRAN. I then downloaded it from CRAN and tried running it from my local R program and received this error: ... Error in f(libname, pkgname) : could not find function "getRcmdr" Error in librar

Re: [R] Printing 2 digits after decimal point [SOLVED]

2010-02-15 Thread T . Wunder
Hi, I'm sorry, I've found the right answer: x <- 0 formatC(x,digits=2, format="f") [1] "0.00" The above worked perfectly! Thanks & Best wishes ;) Tom Quoting twun...@ix.urz.uni-heidelberg.de: Hi there, i'm not getting along with the following problem. I'd like to print a real number, e.g.

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-15 Thread Achim Zeileis
On Sun, 14 Feb 2010, Lam, Tzeng Yih wrote: Dear R Users, When using zeroinfl() function to fit a Zero-Inflated Negative Binomial (ZINB) model to a dataset, the summary() gives an estimate of log(theta) and its standard error, z-value and Pr(>|z|) for the count component. Additionally, it als

[R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread PtitBleu
Hello, I discovered R two years ago and thanks to the R-community I managed to write some scripts to analyze my data stored in mysql databases. The only problem is that I am the only one using R in the lab. Colleagues mainly use Matlab (but not with mysql, only with text files) but regularly come

Re: [R] R-Commander plug-in difficulties

2010-02-15 Thread Prof Brian Ripley
Your package (RcmdrPlugin.MAc on CRAN) does not depend on Rcmdr. I suppose you mean the getRcmdr in Rcmdr, and that will be not available when your package is loaded in a vanilla session. My guess is that you intended such a dependence (in the Depends line in the DESCRIPTION file). It passed

[R] Printing 2 digits after decimal point

2010-02-15 Thread T . Wunder
Hi there, i'm not getting along with the following problem. I'd like to print a real number, e.g. x <- 12.3 with exactly two digits after the decimal point, e.g. 12.30 I've tried the whole format(), formatC() and prettyNum() functions but did not have any success with it. This should work with al

Re: [R] Printing 2 digits after decimal point

2010-02-15 Thread Linlin Yan
format(x, nsmall = 2) On Mon, Feb 15, 2010 at 5:41 PM, wrote: > > Hi there, > > i'm not getting along with the following problem. > I'd like to print a real number, e.g. > x <- 12.3 > with exactly two digits after the decimal point, e.g. > 12.30 > I've tried the whole format(), formatC() and pret

Re: [R] Printing 2 digits after decimal point [SOLVED]

2010-02-15 Thread Sharpie
T.Wunder wrote: > > Hi, > > I'm sorry, I've found the right answer: >> x <- 0 >> formatC(x,digits=2, format="f") > [1] "0.00" > > The above worked perfectly! > Thanks & Best wishes ;) > Tom > That old warhorse, sprintf(), can also be a trusty steed in situations like this. -Charlie -- View

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread Sharpie
PtitBleu wrote: > > Hello, > > I discovered R two years ago and thanks to the R-community I managed to > write some scripts to analyze my data stored in mysql databases. > The only problem is that I am the only one using R in the lab. Colleagues > mainly use Matlab (but not with mysql, only wit

Re: [R] Difference in Levene's test between R and SPSS

2010-02-15 Thread Ravi Kulkarni
I think I have an answer: SPSS uses absolute deviations from the _mean_ in Levene's test. (See calculation in http://www.uvm.edu/~dhowell/gradstat/psych340/Lectures/Anova/anova2.html) R uses absolute deviations from the _median_ (R help). So the difference. Ravi -- View this message in context

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread Romain Francois
Hello, Maybe RInside [1] can help you embed your R script into a C++ application. Romain [1] http://dirk.eddelbuettel.com/code/rinside.html On 02/15/2010 11:37 AM, PtitBleu wrote: Hello, I discovered R two years ago and thanks to the R-community I managed to write some scripts to analyze my

Re: [R] Difference in Levene's test between R and SPSS

2010-02-15 Thread Ravi Kulkarni
I forgot to reply to Peter Ehler's question: I am using Levene's test in the "car" package. Ravi -- View this message in context: http://n4.nabble.com/Difference-in-Levene-s-test-between-R-and-SPSS-tp1555725p1556016.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread Barry Rowlingson
On Mon, Feb 15, 2010 at 10:37 AM, PtitBleu wrote: > > Hello, > > I discovered R two years ago and thanks to the R-community I managed to > write some scripts to analyze my data stored in mysql databases. > The only problem is that I am the only one using R in the lab. Colleagues > mainly use Matla

[R] Storing processed results in a loop

2010-02-15 Thread Madhavi Bhave
Dear R Helpers   I have an 'instrument.csv' file with 3 instrument names and 5 rates each i.e. it has 7 columns and 6 rows (including row names).   'instrument.csv'   instrument1  instrument2   instrument3 12 5    14 11   

Re: [R] mlogit function cut off formular

2010-02-15 Thread Achim Zeileis
On Sun, 14 Feb 2010, Han Qin wrote: I'm trying to fit a multinominal logistic model using package mlogit. I have 15 independent variables. The code looks like this: m<-mlogit(score~0|f1+f2+f3+f4+f5+f6+f7+f8+f9+f10+f11+f12+f13+f14+f15, data, reflevel="1") And it gives the following error message

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread PtitBleu
Thanks to all for your advices. littler is not for xp, isn'it ? Anyway, I will try to convince my boss to keep R. But I'm not sure that I will be successful (there is a pressure to have a single language for all the scripts and even money for that ...). And for this year I have been registered t

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread Romain Francois
On 02/15/2010 01:03 PM, PtitBleu wrote: Thanks to all for your advices. littler is not for xp, isn'it ? Not currently, I'm cc'ing Dirk and Jeff who will surely tell you why not, and what you can do to make it happen. RInside now works happily on windows, and it would not be too hard to emu

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread Barry Rowlingson
On Mon, Feb 15, 2010 at 12:03 PM, PtitBleu wrote: > > Thanks to all for your advices. > > littler is not for xp, isn'it ? Maybe, maybe not, but Rscript definitely is: http://blog.revolution-computing.com/2009/01/using-r-as-a-scripting-language-with-rscript.html You didn't actually mention your

[R] CORRECTION - Storing results in a loop

2010-02-15 Thread Madhavi Bhave
Dear R Helpers (There is a small correction in my earlier mail. In the 'instrument.csv' file, I had mentioned only three columns. Actually there are 7 columns. I regret the error. Rest contents remains the same. Thanks) I have an 'instrument.csv' file with 7 instrument names and 5 rates each i

Re: [R] error message error

2010-02-15 Thread Uwe Ligges
On 15.02.2010 06:34, Roslina Zakaria wrote: Hi r-users, I hope somebody can help me to understand the error message. Here is my code; ## Newton iteration newton_gam<- function(z) { n<- length(z) r<- runif(n) tol<- 1E-6 cdf<- vector(length=n, mode="numeric") fprime<- vector(length

Re: [R] CORRECTION - Storing results in a loop

2010-02-15 Thread Benilton Carvalho
maybe you just want Y = ONS^2 ? b On Mon, Feb 15, 2010 at 12:22 PM, Madhavi Bhave wrote: > Dear R Helpers > > (There is a small correction in my earlier mail. In the 'instrument.csv' > file, I had mentioned only three columns. Actually there are 7 columns. I > regret the error. Rest contents

Re: [R] CORRECTION - Storing results in a loop

2010-02-15 Thread Benilton Carvalho
sorry, meant to type: B = ONS^2 cheers, benilton On Mon, Feb 15, 2010 at 12:28 PM, Benilton Carvalho wrote: > maybe you just want > > Y = ONS^2 > > ? > > b > > On Mon, Feb 15, 2010 at 12:22 PM, Madhavi Bhave > wrote: >> Dear R Helpers >> >> (There is a small correction in my earlier mail. In

Re: [R] CORRECTION - Storing results in a loop

2010-02-15 Thread Madhavi Bhave
Dear Sir,   Thanks a lot for your quick solution. But still I will like someone to guide me the solution as per my requirement. The problem is actually I am not looking for the square of each term. I have used it to give some example since I didn't want to confuse the matter. My process is altog

[R] What symbols are loaded when require()ing?

2010-02-15 Thread Guillaume Yziquel
Hello. I would need to know of a programmatic way to get a list of all the new symbols you get when require(9)ing a package/library. I'd like to know how to do that from within R, or with the C API. Pointers to relevant documentation are also welcome. All the best, -- Guillaume Yziquel

[R] "EstimableS" in R

2010-02-15 Thread Marina Kjærgaard
Hi I've just installed the R version 2.10.1 on my new PC and unfortunately I have problem to use the function Estimables. I have downloaded gmodels succesfully but have problems when I activate the package. I get following meassage; > utils:::menuInstallLocal() package 'gmodels' successfully u

Re: [R] Storing processed results in a loop

2010-02-15 Thread Uwe Ligges
On 15.02.2010 12:47, Madhavi Bhave wrote: Dear R Helpers I have an 'instrument.csv' file with 3 instrument names and 5 rates each i.e. it has 7 columns and 6 rows (including row names). 'instrument.csv' instrument1 instrument2 instrument3 12 5

Re: [R] all possible subsets, with AIC

2010-02-15 Thread Nutter, Benjamin
I've dabbled in this a little bit, and the result of my dabbling is attached. I'll give you fair warning, however. The attached function can take a long time to run, and if your model has 10 or more predictors, you may be retired before it finishes running. In any case, it will models for all po

Re: [R] error message in endseq

2010-02-15 Thread Uwe Ligges
On 15.02.2010 02:29, nomis24 wrote: Hi there, I am new to R and feel so bloody stupid. Abut in spite of a search of several hrs I could not find an answer to my problem. I have imported SPSS data to R, and apart from some warnings regarding duplicate labels, everything looks fine and names li

[R] density estimates for fixed points

2010-02-15 Thread geir
Problem: Based on a n x 2 data matrix i want a kernel estimate of the bivariate density. However, i also wish to specify wich points the density should be calculated at. I can offcourse just write the full kernel density estimate as a R-code, but surely there must already exist some package for

Re: [R] "EstimableS" in R

2010-02-15 Thread Uwe Ligges
On 15.02.2010 12:56, MIKG (Marina Kjærgaard) wrote: Hi I've just installed the R version 2.10.1 on my new PC and unfortunately I have problem to use the function Estimables. I have downloaded gmodels succesfully but have problems when I activate the package. I get following meassage; util

Re: [R] Problem with specifying variance-covariance matrix for random effects (nlme package)

2010-02-15 Thread Uwe Ligges
On 14.02.2010 21:20, Benjamin Cheah wrote: Hi all, I've been struggling with trying to specify a diagnoal matrix for linear mixed effects model. I think I've got nearly everything correct, except the following message appears: In lme.formula(fixed = fwave ~ sex + sexXbulbar + visit + age +

[R] get current window (device) size

2010-02-15 Thread Edmond.Ng
Dear R-listers, I am writing a function that will generate a simple plot for the user . The size of the window (that contains the plot) may not be what the user wants. Supposing the user adjusts the window to a size of her/his choice, I would like to be able to save the new window size and

Re: [R] Plot different regression models on one graph

2010-02-15 Thread Peter Ehlers
Keith, we seem to agree, more or less. I take a simple approach to model fitting: absent any compelling reason for a particular form (here: cubic), I consider that form to be speculative, sometimes reasonably well supported by the data, sometimes not. For the OP's data, the evidence for a cubic mo

Re: [R] CORRECTION - Storing results in a loop

2010-02-15 Thread jim holtman
You might want to understand loops a little more; you are modifying 'j' within the loop which does not do whatever you think it should be doing. You also probably want "B" to be a matrix if you want to store the results for everything besides the last iteration. Here is your loop corrected and fo

Re: [R] error message in endseq

2010-02-15 Thread nomis24
Hallo Uwe, family_seq is the object I defined when I read my SPSS data: family_seq <- read.spss (file="C:\\Documents\\blabla\\fam_seq.sav", use.value.labels=TRUE) I have the impression (which does'nt help) that something doesn't go right with importing the data. As I said, all my variables

Re: [R] error message in endseq

2010-02-15 Thread Uwe Ligges
On 15.02.2010 14:41, nomis24 wrote: Hallo Uwe, family_seq is the object I defined when I read my SPSS data: family_seq<- read.spss (file="C:\\Documents\\blabla\\fam_seq.sav", use.value.labels=TRUE) What I meant with "What is family_seq?" ist that we do not have that object and hence c

[R] argh .. if/else .. why?

2010-02-15 Thread Esmail
Hello, would someone please help explain the following inconsistency in the if/else statement to me? The format of the if/else #3 below is ok, but if/else #1 is not? (I get an "unexpected else" type error.) In order for it to work I have to use if/else #2 Thanks .. maybe there is some reason fo

[R] Is this a bug? (layout and par)

2010-02-15 Thread Martin Ivanov
Dear R users, I think I have spotted a bug in R, but as I am not sure, I first post it to you. Here is a minimal working example: default <- par(no.readonly=TRUE); par(font=1, adj=0.5, cex=1, cex.lab=1, cex.axis=0.5, font.axis=2, lend=2, family="Times", omi=c(0, 0, 0, 0)) layout(mat=matrix(dat

Re: [R] CORRECTION - Storing results in a loop

2010-02-15 Thread Benilton Carvalho
you've got jim's solution... but if all you need to do is what you described in your previous message, you should be able to accomplish it by: B = log(ONS[-1,]/ONS[-nrow(ONS),]) b On Mon, Feb 15, 2010 at 1:35 PM, jim holtman wrote: > You might want to understand loops a little more; you are mo

Re: [R] all possible subsets, with AIC

2010-02-15 Thread Frank E Harrell Jr
Nutter, Benjamin wrote: I've dabbled in this a little bit, and the result of my dabbling is attached. I'll give you fair warning, however. The attached function can take a long time to run, and if your model has 10 or more predictors, you may be retired before it finishes running. In any case,

Re: [R] Multiple figures margin problem

2010-02-15 Thread mnstn
Hi Greg, This is precisely what I want. xaxt/yaxt='n' did the trick. Thanks for pointing it out. MoonStone -- View this message in context: http://n4.nabble.com/Multiple-figures-margin-problem-tp1490455p1556134.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] argh .. if/else .. why?

2010-02-15 Thread jim holtman
Check back in the archieves. This is a common question. The problem is basically when input commands at the command line, when you hit the carriage return it is assuming there is a complete command. 'if' not followed by an 'else' is assumed to be complete and when you type the 'else' by itself i

Re: [R] density estimates for fixed points

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 8:08 AM, geir wrote: Problem: Based on a n x 2 data matrix i want a kernel estimate of the bivariate density. However, i also wish to specify wich points the density should be calculated at. I can offcourse just write the full kernel density estimate as a R- code, but

Re: [R] Need help on boxplot panel chart

2010-02-15 Thread hadley wickham
Hi Doug, Could you please provide a reproducible example? It's difficult to diagnose the problem without one. Hadley On Fri, Feb 12, 2010 at 2:46 PM, DougNiu wrote: > > Hi there: > > I am new to R and creating a boxplot panel chart to show a test result. > > I have four output variables (OV1,

Re: [R] argh .. if/else .. why?

2010-02-15 Thread Lee.Adams
I, personally, utilize the ifelse(test,statement,statement) function when possible over the methodology outlined. Lee P. Adams Luminant Energy - Fuel and Emissions Strategy "We must become the change we want to see." -Mahatma Gandhi -Original Message- From: r-help-boun...@r-project.or

[R] installation of package 'e1071' had non-zero exit status

2010-02-15 Thread mauede
I tried twice to install package "e1071"as it provides the Hamming distance. The installation failed twice. I am running R version 2.9.0 (2009-04-17). Any suggestion is welcome. Thank you, Maura tutti i telefonini TIM! [[alternative HTML version deleted]]

Re: [R] Problem with R on USB-drive

2010-02-15 Thread Peter Dalgaard
Lauri Nikkinen wrote: > The answer is: > >> .libPaths() > [1] "E:/R/R-2.10.1/library" > > stats package is found under > > .../library/ Sorry about the delay Lauri, I don't have the time to skim r-help very well these days, so your note sort of whizzed by. However, I'm not sure I get the p

Re: [R] get current window (device) size

2010-02-15 Thread Prof Brian Ripley
On Mon, 15 Feb 2010, edmond...@lshtm.ac.uk wrote: Dear R-listers, I am writing a function that will generate a simple plot for the user . The size of the window (that contains the plot) may not be what the user wants. Supposing the user adjusts the window to a size of her/his choice, I wou

Re: [R] argh .. if/else .. why?

2010-02-15 Thread Esmail
On 15-Feb-10 09:13, jim holtman wrote: This is a common question. The problem is basically when input commands at the command line, when you hit the carriage return it is assuming there is a complete command. Within a function, or a block like the 'for' loop, the statement is not complete until

Re: [R] argh .. if/else .. why?

2010-02-15 Thread Esmail
On 15-Feb-10 09:27, lee.ad...@luminant.com wrote: I, personally, utilize the ifelse(test,statement,statement) function when possible over the methodology outlined. Haven't used that construct before, I'll check it out. Thanks. And mystery solved. Esmail

[R] Adressing multiple cores (CPUs)

2010-02-15 Thread thomas.schwander
Dear all, I'm sitting here just in front of my new p...@work and wonder about the following question: * How can I adress multiple CPUs (cores) out of R to speed up the simulations I run? * What are the prerequisites to do so? Maybe anyone could give me a hint where to start read

[R] (no subject)

2010-02-15 Thread mauede
here is the message I get upon trying to upgrade R from the provided RPM package for SuSE 11.1 (http://cran.r-project.org): YaST2 conflicts list - generated 2010-02-15 14:00:50 nothing provides libreadline.so.6()(64bit) needed by R-patched-2.10.1-50.1.x86_64 [ ] do not install R-

Re: [R] Adressing multiple cores (CPUs)

2010-02-15 Thread Benilton Carvalho
http://cran.r-project.org/web/views/HighPerformanceComputing.html 2010/2/15 : > Dear all, > > I'm sitting here just in front of my new p...@work and wonder about the > following question: >        * How can I adress multiple CPUs (cores) out of R to speed up the > simulations I run? >        *

Re: [R] argh .. if/else .. why?

2010-02-15 Thread Peter Dalgaard
Esmail wrote: > Ah .. so the fact that this is inside a block (in this case a function) > makes a difference .. I see .. well this is certainly different from other > languages I have worked with, but the explanation is clear. Yes. I think most people involved have realized that it was a design b

Re: [R] get current window (device) size

2010-02-15 Thread Edmond.Ng
Dear Prof Ripley, Thank you very much for your advice. In fact, I have already tried 'par("din")'. It does not seems to pick up the changes made to the window. For example, I issued the par command after the plot: > par("din") [1] 7.5 7.0 [changed window size] > par("din") [1] 7.5 7.0 The res

Re: [R] density estimates for fixed points

2010-02-15 Thread geir
Sorry, i did indeed mean function - not package. kde2d lets you determine the grid - you choose "n" and "lims", which gives you and n x n matrix for which the density is estimated (Seems like the output is meant for graphical purposes). But i have a matrix consisting of points (x,y) where i want

Re: [R] get current window (device) size

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 9:49 AM, wrote: Dear Prof Ripley, Thank you very much for your advice. In fact, I have already tried 'par("din")'. It does not seems to pick up the changes made to the window. For example, I issued the par command after the plot: par("din") [1] 7.5 7.0 [changed window si

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread PtitBleu
Hello everyone, Barry : Thanks for the link to Rscript. I will check this possibility (the os was not given in the text, but in subject :-)) Romain : I think my skills at computing are too low for your solution (I only know a bit of R and of Quick Basic ... nothing with C, C++, ...) and I also d

Re: [R] Is this a bug? (layout and par)

2010-02-15 Thread Peter Ehlers
On 2010-02-15 7:06, Martin Ivanov wrote: Dear R users, I think I have spotted a bug in R, but as I am not sure, I first post it to you. Here is a minimal working example: default<- par(no.readonly=TRUE); par(font=1, adj=0.5, cex=1, cex.lab=1, cex.axis=0.5, font.axis=2, lend=2, family="Times"

[R] rlaplace using rmutil - HELP

2010-02-15 Thread vaibhav dua
Hi, I'm using rlaplace distribution to draw non normal random deviates. I'm using rmutil package for this. I know rlaplace needs location and dispersion parameters but I want to pass diag matrix as dispersion parameters and I'm not getting the correct values. Here is my code snippet: disp

[R] Which is the proper mail list?

2010-02-15 Thread Roy Mendelssohn
Hi All: Even after reading the web pages, it is unclear to me exactly how it is decided what goes into the base distribution, and more to the point, which list I should post to if I want to suggest that a functionality now done by a contributed package be added to the base packages. Thanks fo

Re: [R] Which is the proper mail list?

2010-02-15 Thread Sharpie
Roy Mendelssohn wrote: > > Hi All: > > Even after reading the web pages, it is unclear to me exactly how it is > decided what goes into the base distribution, and more to the point, which > list I should post to if I want to suggest that a functionality now done > by a contributed package be a

Re: [R] rlaplace using rmutil - HELP

2010-02-15 Thread Peter Ehlers
On 2010-02-15 8:26, vaibhav dua wrote: Hi, I'm using rlaplace distribution to draw non normal random deviates. I'm using rmutil package for this. I know rlaplace needs location and dispersion parameters but I want to pass diag matrix as dispersion parameters and I'm not getting the correct va

Re: [R] Adressing multiple cores (CPUs)

2010-02-15 Thread Sharpie
Benilton Carvalho-2 wrote: > > http://cran.r-project.org/web/views/HighPerformanceComputing.html > Also, of the links at the bottom of that page, I found the journal article: "State of the Art in Parallel Computing with R" To be a particularly helpful and easy to read overview of the avail

Re: [R] argh .. if/else .. why?

2010-02-15 Thread hadley wickham
> I, personally, utilize the ifelse(test,statement,statement) function when > possible over the methodology outlined. if + else and ifelse perform quite different tasks, and in general can not (and should not) be exchanged. In particular, note that for ifelse, "the class attribute of the result

Re: [R] argh .. if/else .. why?

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 11:01 AM, hadley wickham wrote: I, personally, utilize the ifelse(test,statement,statement) function when possible over the methodology outlined. if + else and ifelse perform quite different tasks, and in general can not (and should not) be exchanged. In particular, note

Re: [R] get current window (device) size

2010-02-15 Thread Edmond.Ng
Hi David, Thank you for your advice. I have just figured why neither the suggestion of 'par("din")' or "dev.size()" works for me. Having specified 'rescale="fixed"' in a preceding windows() command seems to prevent R from reporting the current window size. See here: windows(width=7.5,height=6,r

Re: [R] argh .. if/else .. why?

2010-02-15 Thread Gabor Grothendieck
On Mon, Feb 15, 2010 at 11:24 AM, David Winsemius wrote: > > On Feb 15, 2010, at 11:01 AM, hadley wickham wrote: > >>> I, personally, utilize the ifelse(test,statement,statement) function when >>> possible over the methodology outlined. >> >> if + else and ifelse perform quite different tasks, and

Re: [R] rlaplace using rmutil - HELP

2010-02-15 Thread vaibhav dua
Hi Peter, Thanks for quick reply. Like I said that I'm aware that it needs a vector but I want to use diagonal matrix. As you have noted, It could be possible that rlaplace reading dispDiag as a vector and not matrix like c(3,0,0,0,.20,0,0,0,.1) so I thought to change the code little bit: d

Re: [R] lattice/ylim: how to fix ylim[1], but have ylim[2] dynamically calculated?

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 2:29 AM, Johannes Graumann wrote: Rolf Turner wrote: On 15/02/2010, at 9:40 AM, Johannes Graumann wrote (In response to some advice from David Winsemius): I am quite certain that this is the most elaborately worded version of "RTFM" I have ever come across. I no

[R] Mailing List

2010-02-15 Thread Audra Taylor
I would like to be removed from the R mailing list [[alternative HTML version deleted]] __ 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-g

Re: [R] density estimates for fixed points

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 10:02 AM, geir wrote: Sorry, i did indeed mean function - not package. kde2d lets you determine the grid - you choose "n" and "lims", which gives you and n x n matrix for which the density is estimated (Seems like the output is meant for graphical purposes). But i have

Re: [R] Mailing List

2010-02-15 Thread stephen sefick
Go through the procedure outlined where you signed up. I can't take you off of the list. On Mon, Feb 15, 2010 at 10:39 AM, Audra Taylor wrote: > I would like to be removed from the R mailing list > > > >        [[alternative HTML version deleted]] > >

[R] Which method is called in command like "class(x)='something'"?

2010-02-15 Thread blue sky
> x=3 > `class<-`(x,'something')#this command prints [1] 3 attr(,"class") [1] "something" > x=3 > class(x)='something'#this command doesn't print anything The first of the above two commands print the content of 'x' but the second doesn't, although both of them set the argument 'x'. I'm wondering

[R] Non-monotonic spline using splinefun(method = "monoH.FC")

2010-02-15 Thread Tim Heaton
Hi, In my version of R, the stats package splinefun code for fitting a Fritsch and Carlson monotonic spline does not appear to guarantee a monotonic result. If two adjoining sections both have over/undershoot the way the resulting adjustment of alpha and beta is performed can give modified values

[R] R still accepts the undocumented option --with-iconv=no

2010-02-15 Thread Dr. David Kirkby
This is not so much a user help question, as a bug report (I think!) Previous versions of R allowed the option --with-iconv=no to used to disable the use of iconv. That option is no longer documented. However, using that option on the latest does not generate an error message, but is silently i

Re: [R] Non-monotonic spline using splinefun(method = "monoH.FC")

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 10:59 AM, Tim Heaton wrote: Hi, In my version of R, the stats package splinefun code for fitting a Fritsch and Carlson monotonic spline does not appear to guarantee a monotonic result. If two adjoining sections both have over/undershoot the way the resulting adjustment of a

Re: [R] Which method is called in command like "class(x)='something'"?

2010-02-15 Thread Barry Rowlingson
On Mon, Feb 15, 2010 at 5:07 PM, blue sky wrote: >> x=3 >> `class<-`(x,'something')#this command prints > [1] 3 > attr(,"class") > [1] "something" >> x=3 >> class(x)='something'#this command doesn't print anything > > The first of the above two commands print the content of 'x' but the > second do

[R] tree-drawing in R ?

2010-02-15 Thread Oliver Kullmann
Hello, I wonder whether binary (rooted) trees with simple labels (say, integers) can be drawn by some R-package? Couldn't find one. Just to make sure (since "trees" can be many things): I mean those computer-science creatures, with roots and subtrees. Thanks for your consideration in any case Ol

Re: [R] Non-monotonic spline using splinefun(method = "monoH.FC")

2010-02-15 Thread David Winsemius
On Feb 15, 2010, at 1:06 PM, Tim Heaton wrote: Hi, Thanks for the reply but I think you are confusing monotonic and strictly increasing/decreasing. I also just used the y-value of the last knot as a simple example as that is not the bit where it goes wrong. It will still produce a non-mon

Re: [R] rlaplace using rmutil - HELP

2010-02-15 Thread Peter Ehlers
On 2010-02-15 9:38, vaibhav dua wrote: Hi Peter, Thanks for quick reply. Like I said that I'm aware that it needs a vector but I want to use diagonal matrix. As you have noted, It could be possible that rlaplace reading dispDiag as a vector and not matrix like c(3,0,0,0,.20,0,0,0,.1) so I tho

[R] Which method is called when print(a_list)?

2010-02-15 Thread blue sky
I don't find print.list. Could somebody let me know which method is called when I run command print(a_list), where a_list is a list? Is 'print.default' used for printing a list? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Which method is called when print(a_list)?

2010-02-15 Thread Erik Iverson
blue sky wrote: I don't find print.list. Could somebody let me know which method is called when I run command print(a_list), where a_list is a list? Is 'print.default' used for printing a list? Yes. You can always debug functions to investigate what's going on, too. See ?debug. __

Re: [R] Adressing multiple cores (CPUs)

2010-02-15 Thread Cedrick W. Johnson
Since you're on Windows, try the 'snow' package... the other suggestions are highly suggested and recommended as well hth c thomas.schwan...@mvv.de wrote: Dear all, I'm sitting here just in front of my new p...@work and wonder about the following question: * How can I adress multipl

Re: [R] Non-monotonic spline using splinefun(method = "monoH.FC")

2010-02-15 Thread Tim Heaton
Hi, Thanks for the reply but I think you are confusing monotonic and strictly increasing/decreasing. I also just used the y-value of the last knot as a simple example as that is not the bit where it goes wrong. It will still produce a non-monotonic spline if you use for example x <- 1:8 y <- c(-

Re: [R] Sampling from Bivariate Uniform Distribution

2010-02-15 Thread Haneef_An
When I wrap those values in to a matrix will it be still independent ? ( non zero correlation). Can I do this for any multivariate distribution which has the univariate form? Thank you for the response. Haneef -- View this message in context: http://n4.nabble.com/Sampling-from-Bivariate-Unif

[R] Confidence intervals nls

2010-02-15 Thread FishR
Dear All I am quite new to R and would appreciate some help fitting 95% confidence intervals to a nls function. I have the data DOY CET 90 5.9 91 8 92 8.4 93 7.7 95 6.6 96 6.8 97 7.1 98 9.7 99 12.3 100 12.8 102 11 103 9.3 104 9.8

Re: [R] Problems with boxplot in ggplot2:qplot

2010-02-15 Thread hadley wickham
Hi Dimitri, Have you looked at the examples for scale_x_date - http://had.co.nz/ggplot2/scale_date.html? They show you how to both set the limits and control the labels. Hadley On Sun, Feb 14, 2010 at 1:34 PM, Dimitri Shvorob wrote: > > ... Unfortunately, a problem remains: I cannot label x ti

Re: [R] Selective load of .First() function just for Rgui.exe

2010-02-15 Thread Steve Taylor
Here's another way to have different behaviour only for interactive sessions: if (interactive()) { winMenuAdd(menuname, NULL, NULL) # etc. } >>> From: Duncan Murdoch To: CC: Date: 13/Feb/2010 6:15 a.m. Subject: Re: [R] Selective load of .First() function just for Rgui.exe On 12/02/2010 11:

[R] creating functions question

2010-02-15 Thread AC Del Re
Hi All, I am interested in creating a function that will take x number of lm objects and automate the comparison of each model (using anova). Here is a simple example (the actual function will involve more than what Im presenting but is irrelevant for the example): # sample data: id<-rep(1:20)

Re: [R] using step() with package geepack

2010-02-15 Thread Steve Taylor
Is anyone else using the 'geepack' package? >>> From: "Steve Taylor" To: Date: 11/Feb/2010 11:28 a.m. Subject: [R] using step() with package geepack I'm using the package geepack to fit GEE models. Does anyone know of methods for add1 and drop1 for a 'geeglm' model object, or perhaps a method

Re: [R] creating functions question

2010-02-15 Thread Dimitris Rizopoulos
try this: MRfit <- function (...) { models <- list(...) do.call(anova, models) } I hope it helps. Best, Dimitris AC Del Re wrote: Hi All, I am interested in creating a function that will take x number of lm objects and automate the comparison of each model (using anova). Here is a

[R] Adjusted means and generalized chain block designs

2010-02-15 Thread Giles
Dear Colleagues, John Mandel ( Chain block designs with two-way elimination of heterogeneity. Biometrics 10, 251-272 ,1954). extended the class of chain block designs (Youden & Conner (1953) to elimination of both row and column (blocks) effects. These experimental designs can be useful in engin

Re: [R] creating functions question

2010-02-15 Thread AC Del Re
Perfect! Thank you, Dimitris. AC On Mon, Feb 15, 2010 at 1:45 PM, Dimitris Rizopoulos wrote: > try this: > > MRfit <- function (...) { >    models <- list(...) >>    do.call(anova, models) >> } >> >> >> I hope it helps. >> >> Best, >> Dimitris >> >> >> AC Del Re wrote: >>> >>> Hi All, >>>

Re: [R] tree-drawing in R ?

2010-02-15 Thread William Revelle
try Rgraphviz diagram At 6:07 PM + 2/15/10, Oliver Kullmann wrote: Hello, I wonder whether binary (rooted) trees with simple labels (say, integers) can be drawn by some R-package? Couldn't find one. Just to make sure (since "trees" can be many things): I mean those computer-science creatu

  1   2   >