Re: [R] converting MATLAB -> R | element-wise operation

2024-02-28 Thread Berwin A Turlach
On Tue, 27 Feb 2024 14:54:26 -0500 Evan Cooch wrote: > So, trying to convert a very long, somewhat technical bit of lin alg > MATLAB code to R. Most of it working, but raninto a stumbling block > that is probaably simple enough for someone to explain. On

Re: [R] converting MATLAB -> R | element-wise operation

2024-02-28 Thread Berwin A Turlach
On Tue, 27 Feb 2024 13:51:25 -0800 Jeff Newmiller via R-help wrote: > The fundamental data type in Matlab is a matrix... they don't have > vectors, they have Nx1 matrices and 1xM matrices. Also known as column vectors and row vectors. :) > Vectors don't have any concept of "row" vs.

Re: [R] [External] converting MATLAB -> R | element-wise operation

2024-02-28 Thread Berwin A Turlach
On Tue, 27 Feb 2024 21:37:52 + "Richard M. Heiberger" wrote: > > t(t(NN)/lambda) > [,1] [,2] [,3] > [1,] 0.5 0.667 0.75 > [2,] 2.0 1.667 1.50 > > > > R matrices are column-based. MATLAB matrices are row-based. It might depend on what you mean with this statement,

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-17 Thread Berwin A Turlach
G'day Philipp, On Fri, 16 Feb 2024 17:33:13 +0100 Philipp Schneider wrote: > Thanks for all the input. It's happening again. This time for the > packages "DBI", "parallelly", "segmented", "survival", "V8". So, > RStudio shows updates for those and updating them via RStudio leads > to this

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread Berwin A Turlach
G'day Philipp, On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help wrote: > this question is related to this > (https://community.rstudio.com/t/packages-are-not-updating/166214/3), > [...] > To sum it up: If I am updating packages (be it via Bioconductor or > CRAN) some packages simply

Re: [R] different results between cor and ccf

2024-01-16 Thread Berwin A Turlach
G'day Patrick, On Tue, 16 Jan 2024 09:19:40 +0100 Patrick Giraudoux wrote: [...] > So far so good, but when I lag one of the series, I cannot find the > same correlation as with ccf > > > cor(x[1:(length(x)-1)],y[2:length(y)]) [1] -0.7903428 > > ... where I expect -0.668 based on ccf > >

Re: [R] non-linear regression and root finding

2023-11-06 Thread Berwin A Turlach
G'day Troels, On Tue, 7 Nov 2023 07:14:02 +0100 Troels Ring wrote: > Be as it may, I wonder if not your method might work if only we KNOW > that pK1 is either positive OR negative, in which case we have pK1 = > -exp(theta1)? If pK1 can be either negative or positive (or 0 :-) ), and it is just

Re: [R] non-linear regression and root finding

2023-11-06 Thread Berwin A Turlach
G'day Troels, On Mon, 6 Nov 2023 20:43:10 +0100 Troels Ring wrote: > Thanks a lot! This was amazing. I'm not sure I see how the conditiion > pK1 < pK2 < pK3 is enforced? One way of enforcing such constraints (well, in finite computer arithemtic only "<=" can be enforced) is to rewrite the

Re: [R] Issues when trying to fit a nonlinear regression model

2023-08-20 Thread Berwin A Turlach
G'day Paul, On Sun, 20 Aug 2023 12:15:08 -0500 Paul Bernal wrote: > Any idea on how to proceed in this situation? What could I do? You are fitting a simple asymptotic model for which nls() can find good starting values if you use the self starting models (SSxyz()). Well, Doug (et al.) choose

Re: [R] geom_smooth

2023-08-12 Thread Berwin A Turlach
G'day Thomas, On Sat, 12 Aug 2023 04:17:42 + (UTC) Thomas Subia via R-help wrote: > Here is my reproducible code for a graph using geom_smooth The call "library(tidyverse)" was missing. :) > I'd like to add a black boundary around the shaded area. I suspect > this can be done with

Re: [R] suprising behaviour of tryCatch()

2023-05-18 Thread Berwin A Turlach
G'day Henrik, On Thu, 18 May 2023 08:35:38 -0700 Henrik Bengtsson wrote: > ... or just put the R expression inside curly brackets, e.g. I was wondering whether I was having a fortunes::fortune(106) moment. :-) Cheers, Berwin __

Re: [R] suprising behaviour of tryCatch()

2023-05-18 Thread Berwin A Turlach
G'day Greg, On Thu, 18 May 2023 08:57:55 -0600 Greg Snow <538...@gmail.com> wrote: [...] > `fun(x <- expr)` Assigns the value of `expr` to the variable `x` in > the frame/environment that `fun` is called from. Only if the argument 'x' is evaluated during the function call AFAIK. If it is not,

Re: [R] suprising behaviour of tryCatch()

2023-05-18 Thread Berwin A Turlach
G'day Federico, On Wed, 17 May 2023 10:42:17 + "Calboli Federico (LUKE)" wrote: > sexsnp = rep(NA, 1750) > for(i in 1:1750){tryCatch(sexsnp[i] = fisher.test(table(data[,3], > data[,i + 38]))$p, error = function(e) print(NA))} Error: unexpected > '=' in "for(i in 1:1750){tryCatch(sexsnp[i]

Re: [R] suprising behaviour of tryCatch()

2023-05-18 Thread Berwin A Turlach
G'day Federico, On Wed, 17 May 2023 10:42:17 + "Calboli Federico (LUKE)" wrote: > I_d be obliged if someone can explain why tryCatch assigns items with _<-_ > and not _=_. It is not just tryCatch but any function. In function calls the "=" is used to assign actual arguments to formal

Re: [R] question about update()

2023-05-04 Thread Berwin A Turlach
G'day Adelchi, hope all is well with you. On Thu, 4 May 2023 10:34:00 +0200 Adelchi Azzalini via R-help wrote: > Thanks, Duncan. What you indicate is surely the ideal route. > Unfortunately, in my case this is not feasible, because the > construction of xf and the update call are within an

Re: [R] Trying to learn how to write an "advanced" function

2023-03-16 Thread Berwin A Turlach
G'day John, For these snippets to produce what I think you want them to produce it is just necessary to define doit() as follows: doit <- function(x){ lm(formula=x) } R> # run formula y~x R> JD <- doit(y~x) R> JD Call: lm(formula = x) Coefficients: (Intercept)x 0.8403

Re: [R] Environmental oddity --- reproducible example.

2021-11-07 Thread Berwin A Turlach
G'day Rolf, On Sun, 7 Nov 2021 19:33:40 +1300 Rolf Turner wrote: > library(Deriv) > d1 <- Deriv(dnorm,"sd") > source("d2.txt") # d2.txt is attached > > d1(1,0,3,TRUE) # [1] -0.2962963 > d2(1,0,3,TRUE) # [1] -0.889 Fascinating: R> pryr::call_tree(body(d1)) R> pryr::call_tree(body(d2))

Re: [R] I am struggling with contrasts

2020-03-10 Thread Berwin A Turlach
G'day all, On Tue, 10 Mar 2020 11:07:13 + "Viechtbauer, Wolfgang (SP)" wrote: > The linearHypothesis() function from the 'car' package does this. The function glht() in the 'multcomp' package should also be able to do this. The 'emmeans' package might also be useful. Will be off-line

Re: [R] I am struggling with contrasts

2020-03-09 Thread Berwin A Turlach
G'day John, On Tue, 10 Mar 2020 01:42:46 + "Sorkin, John" wrote: > I am running a Poisson regression with a single outcome variable, > HGE, and a single independent variable, a factor, Group which can be > one of two values, Group1, or Group2. I am trying to define contrasts > that will

Re: [R] does pdf() work inside of a function?

2019-07-28 Thread Berwin A Turlach
G'day Anuj, On Sun, 28 Jul 2019 16:40:28 -0700 Anuj Goyal wrote: > Why does pdf() work outside a function, but not inside it? Because you use a graphics system that need printing to produce the plot. On the command line auto-printing is your friend, but in functions you have to do it

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-25 Thread Berwin A Turlach
G'day Rolf, On Sun, 26 Aug 2018 13:00:34 +1200 Rolf Turner wrote: > On 08/26/2018 02:59 AM, Berwin A Turlach wrote: > > > I am not sure whether I agree. :) > > Huh? Black is white and up is down??? Nope, but as I said, on my machine RStudio and the R installed from the U

Re: [R] installing R 3.5.1

2018-08-25 Thread Berwin A Turlach
Dear Bogdan, On Sat, 25 Aug 2018 07:24:40 -0700 Bogdan Tanasa wrote: > installed E: Unable to correct problems, you have held broken > packages. Perhaps this is the problem, did you try "apt-get -f install"? Cheers, Berwin __

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-25 Thread Berwin A Turlach
G'day Rolf, On Sat, 25 Aug 2018 11:20:09 +1200 Rolf Turner wrote: > I was pretty sure that the foregoing was a complete red herring. And > I was right. I am not sure whether I agree. :) > I have been told by younger and wiser heads that installing from > source is The Right Thing to Do.

Re: [R] installing R 3.5.1

2018-08-25 Thread Berwin A Turlach
G'day Bogdan, On Fri, 24 Aug 2018 18:28:59 -0700 Bogdan Tanasa wrote: > I am trying to install R 3.5.1 on my Ubuntu 14.04 system; however, I > am getting the following message : > > sudo apt-get install r-base > [...] > The following packages have unmet dependencies: > r-base : Depends:

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-24 Thread Berwin A Turlach
G'day Peter, On Thu, 23 Aug 2018 08:45:37 -0700 Peter Langfelder wrote: > The manual, specifically > > https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installation > > documents this way of choosing the installation directory. Yes, with the caveat that one needs GNU or Solaris

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-23 Thread Berwin A Turlach
G'day Rolf, On Thu, 23 Aug 2018 23:34:38 +1200 Rolf Turner wrote: > I guess I should have said --- I did > > sudo make prefix=/usr install > > which puts stuff into /usr rather than into /usr/local. ??? I do not remember ever specifying "prefix=foo" at the make install stage. Not for

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-23 Thread Berwin A Turlach
G'day Rolf, On Thu, 23 Aug 2018 22:57:35 +1200 Rolf Turner wrote: > I *think* that this is an R question (and *not* an RStudio question!) Others may disagree... :) > I have, somewhat against my better judgement, decided to experiment > with using RStudio. Very good if you are still involved

Re: [R] Fwd: Quadratic programming, for loop

2018-06-29 Thread Berwin A Turlach
G'day Maija, On Wed, 27 Jun 2018 08:48:08 +0300 Maija Sirkjärvi wrote: > Thanks for your reply! Unfortunately something is still wrong. > > After the transpose, dvec and Amat are still incompatible. > > > d <- -hsmooth > > dvec <- t(d) > > c <- dvec*Amat > Error in dvec * Amat :

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Berwin A Turlach
G'day all, On Tue, 26 Jun 2018 11:16:55 +0300 Maija Sirkjärvi wrote: > It seems that my Amat and dvec are incompatible. Amat is a matrix of > zeros size: *2*J-3,J* and dvec is a vector of length *J*. There > should be no problem, but apparently there is. [...] solve.QP solves the quadratic

Re: [R] Nonlinear regression

2017-12-19 Thread Berwin A Turlach
G'day Timothy, On Tue, 19 Dec 2017 18:28:00 -0600 Timothy Axberg wrote: > Should I repost the question with reply-all? Nope, we got all from Jeff's post. :) > On Tue, Dec 19, 2017 at 6:13 PM, Jeff Newmiller > wrote: > > > You also need to

Re: [R] Generating help files for a function

2017-12-16 Thread Berwin A Turlach
G'day Erin, On Sat, 16 Dec 2017 08:00:38 -0600 Erin Hodgess wrote: > I'm in the process of writing a package, and I'm using the lovely "R > Package" book as a guideline. > > However, in the midst of my work, I discovered that I had omitted a > function and am now

Re: [R] [FORGED] Re: tcltk problems

2017-11-20 Thread Berwin A Turlach
G'day Peter, On Sat, 18 Nov 2017 23:20:25 +0100 peter dalgaard wrote: > Hum, missed that bit. Looking at the configure script, the only way I > can see it failing to look in /usr/lib/tcl8.6 is if ${LIBnn} is not > "lib". Any chance it might be set to lib64? Well, yes, in an

Re: [R] deviance in GLM vs. summary.glm

2017-05-31 Thread Berwin A Turlach
shes, Berwin ========== Full address A/Prof Berwin A Turlach, Director Tel.: +61 (8) 6488 3338 (secr) Centre for Applied Statistics +61 (8) 6488 3383 (self) School of Maths and Stats (M019) FAX : +61 (8) 6488 1028 The University of Western Austral

Re: [R] xvfb? cron job updates R packages, fails on some requiring X11

2017-01-20 Thread Berwin A Turlach
G'day Paul, On Thu, 19 Jan 2017 10:52:16 -0600 Paul Johnson wrote: > In Centos 7 systems, I wrote a script that runs on the cron and I > notice some package updates and installs fail like this: > > [] > > I understand I need something like xvfb to simulate an X11

Re: [R] Feature or bug?

2015-05-21 Thread Berwin A Turlach
) + print(paste(After:, input$time)) + } R ginput - new.env() R ginput$time - 0 R server(ginput) [1] Before 0 [1] After: 1 HTH. Cheers, Berwin == Full address A/Prof Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School

Re: [R] cbind question, please

2015-04-24 Thread Berwin A Turlach
G'day Erin, On Thu, 23 Apr 2015 20:51:18 -0400 Erin Hodgess erinm.hodg...@gmail.com wrote: Here is the big picture. I have a character vector with all of the names of the variables in it. I want to cbind all of the variables to create a matrix. Doing 3 is straightforward, but many, not

Re: [R] Where did lost variables go

2013-12-31 Thread Berwin A Turlach
G'day David, On Mon, 30 Dec 2013 20:42:53 -0500 David Parkhurst parkh...@indiana.edu wrote: Some wild guesses in the absence of a reproducible example. I have several variables in a data frame that aren't listed by ls() after I attach that data frame. ls() list the objects in the global

Re: [R] replicating C example from the Extensions Manual problem

2012-03-15 Thread Berwin A Turlach
G'day Erin, On Thu, 15 Mar 2012 01:03:59 -0500 Erin Hodgess erinm.hodg...@gmail.com wrote: What is wrong, please? Missing #include R.h #include Rinternals.h In particular the latter is defining R_len_t. Guess that code snippet in the manual is only showing the code of the function, but not

Re: [R] Argument validation within functions

2011-12-06 Thread Berwin A Turlach
to test if it is set with the function call not outside the function or before etc. ?missing Cheers, Berwin == Full address A/Prof Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019

Re: [R] expand.gird with constraints?

2011-08-02 Thread Berwin A Turlach
, Berwin == Full address A/Prof Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway

Re: [R] Standards for delivery of GPL software in CRAN packages

2011-06-27 Thread Berwin A Turlach
G'day Gavin, On Mon, 27 Jun 2011 16:36:57 +0100 Gavin Simpson gavin.simp...@ucl.ac.uk wrote: [...] I don't recall the GPL mentioning anything requiring that the source code be helpful. The authors have most certainly fulfilled their requirements under GPL, as has CRAN in distributing the

Re: [R] %in% operator - NOT IN

2011-05-08 Thread Berwin A Turlach
G'day Dan, On Sun, 8 May 2011 05:06:27 -0400 Dan Abner dan.abne...@gmail.com wrote: Hello everyone, I am attempting to use the %in% operator with the ! to produce a NOT IN type of operation. Why does this not work? Suggestions? data2[data1$char1 %in% c(string1,string2),1]-min(data1$x1)

Re: [R] Using $ accessor in GAM formula

2011-05-06 Thread Berwin A Turlach
your academic curiosity is now satisfied. :) HTH. Cheers, Berwin == Full address A/Prof Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University

Re: [R] Strange R squared, possible error

2011-03-17 Thread Berwin A Turlach
of the variance of the fitted model plus the variance of the residuals. Or am I missing something? Cheers, Berwin == Full address A/Prof Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019

Re: [R] Strange R squared, possible error

2011-03-17 Thread Berwin A Turlach
G'day Gabor, On Thu, 17 Mar 2011 20:38:21 -0400 Gabor Grothendieck ggrothendi...@gmail.com wrote: Or am I missing something? O.k., because the residuals don't add to zero, there may be a non-zero correlation between residuals and fitted values, which messes up the equation at the variance

Re: [R] identical values not so identical? newbie help please!

2011-03-10 Thread Berwin A Turlach
the help page on all.equal(). As all.equal() tries to report the difference between the objects, if one exists, one should not compare the result from all.equal directly to TRUE. HTH. Cheers, Berwin == Full address A/Prof Berwin

Re: [R] two apparent anomalies

2011-01-22 Thread Berwin A Turlach
Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009e-mail: ber

Re: [R] expand.grid

2011-01-19 Thread Berwin A Turlach
g 9 NA NA g 10ad h 11bd h HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self

Re: [R] Retrieving Factors with Levels Ordered

2010-12-31 Thread Berwin A Turlach
over! :) HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8

Re: [R] using ``-'' in function argument

2010-12-03 Thread Berwin A Turlach
G'day Ivan, On Fri, 03 Dec 2010 10:54:58 +0100 Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Arf, yes it makes sense now! Well, my original post said: R has lazy evaluation and the assignment takes place when the function evaluates the argument :) So the idea here is: never use - in

Re: [R] using ``-'' in function argument

2010-12-02 Thread Berwin A Turlach
Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009e-mail

Re: [R] DBLEPR?

2010-11-16 Thread Berwin A Turlach
Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009e-mail: ber

Re: [R] what´s wrong with this code?

2010-10-29 Thread Berwin A Turlach
G'day Jose, On Fri, 29 Oct 2010 11:25:05 +0200 José Manuel Gavilán Ruiz g...@us.es wrote: Hello, I want to maximize a likelihood function expressed as an integral that can not be symbolically evaluated. I expose my problem in a reduced form. g- function(x){ integrand-function(y)

Re: [R] what´s wrong with this code?

2010-10-29 Thread Berwin A Turlach
G'day Jose, On Fri, 29 Oct 2010 11:25:05 +0200 José Manuel Gavilán Ruiz g...@us.es wrote: Hello, I want to maximize a likelihood function expressed as an integral that can not be symbolically evaluated. I expose my problem in a reduced form. g- function(x){ integrand-function(y)

Re: [R] R version 2-12.0 - running as 32 or as 64 bit?

2010-10-29 Thread Berwin A Turlach
that message, you can always issue the command .Machine$sizeof.pointer if the answer is 4, you are running 32bit, if the answer is 8, then you are running 64 bit. HTH. Cheers, Berwin == Full address Berwin A Turlach

Re: [R] cube root of a negative number

2010-10-26 Thread Berwin A Turlach
shed more light on this issue. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia

Re: [R] cube root of a negative number

2010-10-26 Thread Berwin A Turlach
G'day Bill, On Wed, 27 Oct 2010 10:34:27 +1100 bill.venab...@csiro.au wrote: [...] It is no surprise that this does not work when working in the real domain, except by fluke with something like -4^(1/3) [1] -1.587401 where the precedence of the operators is not what you might

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berwin A Turlach
there is an option to specify which exportable symbols have to be in the DLL in the end. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berwin A Turlach
G'day all, On Mon, 25 Oct 2010 06:52:15 -0400 Duncan Murdoch murdoch.dun...@gmail.com wrote: Remko Duursma wrote: [...] I.e, my code looks something like this: subroutine f(x,y,z) call g(x,y,z) end subroutine g(x,y,z) z = x*y end calling this from R shows

Re: [R] creating 'all' sum contrasts

2010-10-15 Thread Berwin A Turlach
this automatically? Look at package multcomp, in particular functions glht and mcp, these might help. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019

Re: [R] declaring GPL license

2010-10-14 Thread Berwin A Turlach
G'day Marc, On Thu, 14 Oct 2010 10:46:39 -0500 Marc Schwartz marc_schwa...@me.com wrote: If you want (and you should), create and include a file called COPYING in the 'inst' folder in the package, so that it gets copied to the main package directory upon installation. [...] But that would be

Re: [R] declaring GPL license

2010-10-14 Thread Berwin A Turlach
G'day Stacey, On Thu, 14 Oct 2010 12:36:20 -0400 Stacey Wood sjw...@ncsu.edu wrote: Thanks everyone. Now I know that I should not include another copy of the license, but where should I refer to the copies on http://www.r-project.org/Licenses/? In the DESCRIPTION file? I used to mention

Re: [R] exponentiate elements of a whole matrix

2010-10-13 Thread Berwin A Turlach
,] 7.389056 54.59815 Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488

Re: [R] how to make list() return a list of *named* elements

2010-10-04 Thread Berwin A Turlach
On Mon, 4 Oct 2010 19:45:23 +0800 Berwin A Turlach ber...@maths.uwa.edu.au wrote: Mmh, R my.return - function (vector.of.variable.names) { sapply(vector.of.variable.names, function(x) list(get(x))) } make that: R my.return - function (vector.of.variable.names) { sapply

Re: [R] how to make list() return a list of *named* elements

2010-10-04 Thread Berwin A Turlach
$ my.c: int [1:4] 7 5 23 4 Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia

Re: [R] R Spracheinstellung

2010-09-29 Thread Berwin A Turlach
G'day Tobias, On Wed, 29 Sep 2010 14:01:10 + Keller Tobias (kelleto0) kelle...@students.zhaw.ch wrote: Für unseren Statistik Unterricht brauchen wir das R-Programm. Ich habe das Programm heruntergeladen, deutsch gewählt und installiert. Das Problem ist nach 3mal neu installieren, dass das

Re: [R] OT: What distribution is this?

2010-09-26 Thread Berwin A Turlach
G'day Rainer, On Sun, 26 Sep 2010 10:29:08 +0200 Rainer M Krug r.m.k...@gmail.com wrote: I realized that I am simply interested in the pdf p(y) that y *number* of entities (which ones is irrelevant) in N are are *not* drawn after the sampling process has been completed. Even simpler (I

Re: [R] OT: What distribution is this?

2010-09-25 Thread Berwin A Turlach
of two (or more) entities. HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western

Re: [R] minor diagonal in R

2010-09-07 Thread Berwin A Turlach
4 Or A[cbind(1:4,4:1)] [1] 13 10 7 4 one character more to type, but could be more efficient for large A :) Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths

Re: [R] Call to rgamma using .C causes R to hang

2010-07-20 Thread Berwin A Turlach
Extensions manual. :) http://cran.r-project.org/doc/manuals/R-exts.html#Random-numbers HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019

Re: [R] Namibia becoming NA

2010-07-18 Thread Berwin A Turlach
. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Berwin A Turlach
(,contrasts) [,1] [,2] [,3] 110 0.2886751 200 -0.8660254 301 0.2886751 4 -1 -1 0.2886751 Levels: 1 2 3 4 HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488

Re: [R] rgl installation failure

2010-06-05 Thread Berwin A Turlach
to find out which packages have to be installed additionally so that you are able to compile rgl. HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019

Re: [R] Gelman 2006 half-Cauchy distribution

2010-05-28 Thread Berwin A Turlach
, to=200) or, more compactly, R curve(2*dcauchy(x, location=0, scale=25), from=0, to=200) Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019

Re: [R] pdf files in loops

2010-03-31 Thread Berwin A Turlach
, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway

Re: [R] pdf files in loops

2010-03-31 Thread Berwin A Turlach
On Wed, 31 Mar 2010 22:06:48 -0400 James Rome jamesr...@gmail.com wrote: print() did not help, and I get strange messages about mode(onefile) not being changed: Either: R pic - histogram(...) R print(pic) or R print(histogram(...)) I would actually like all the histograms in one pdf file

Re: [R] From THE R BOOK - Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

2010-03-30 Thread Berwin A Turlach
AIC: 49.87 Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! HTH, Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats

Re: [R] language!!!

2010-03-18 Thread Berwin A Turlach
are welcome. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028

Re: [R] OT Sorta: Odds Are, It's Wrong...

2010-03-16 Thread Berwin A Turlach
G'day all, On Mon, 15 Mar 2010 12:46:42 -0500 Marc Schwartz marc_schwa...@me.com wrote: In turn, that reminds me of Stephen Senn's writing in Dicing with Death: Chance, Risk and Health: We can predict nothing with certainty but we can predict how uncertain our predictions will be, on

Re: [R] capturing errors in Sweave

2010-03-02 Thread Berwin A Turlach
in my Sweave output without having to try whether Jean Lobry's [1] hack still works. :) HTH. Cheers, Berwin [1] https://www.stat.math.ethz.ch/pipermail/r-help/2006-December/121975.html == Full address Berwin A Turlach

Re: [R] capturing errors in Sweave

2010-03-02 Thread Berwin A Turlach
G'day Sundar, On Tue, 2 Mar 2010 01:03:54 -0800 Sundar Dorai-Raj sdorai...@gmail.com wrote: Thanks, Berwin. That works just great! You are welcome. I noticed by now that cat(tmp) is sufficient; the tmp[1] in cat(tmp[1]) was a left over from earlier attempts to get the output to look correct.

Re: [R] advice/opinion on - vs = in teaching R

2010-01-15 Thread Berwin A Turlach
G'day all, On Fri, 15 Jan 2010 09:08:44 - (GMT) (Ted Harding) ted.hard...@manchester.ac.uk wrote: On 15-Jan-10 08:14:04, Barry Rowlingson wrote: [...] I would regard modifying a variable within the parameters of a function call as pretty tasteless. What does: foo(x-2,x) or

Re: [R] Relase positive with log and zero of negative with 0

2009-11-15 Thread Berwin A Turlach
, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling

Re: [R] R and HDF5 Question

2009-11-13 Thread Berwin A Turlach
G'day Scott, On Fri, 13 Nov 2009 09:52:43 -0700 Scott MacDonald scott.p.macdon...@gmail.com wrote: I am trying to load an hdf5 file into R and running into some problems. It's a while that I used hdf5 files and that package in R, but: This builds fine. The library seems to load without

Re: [R] Unexpected behaviour for as.date()

2009-11-10 Thread Berwin A Turlach
== Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley

Re: [R] Unexpected behaviour for as.date()

2009-11-10 Thread Berwin A Turlach
) as.numeric(strsplit(x, -)[[1]][3])) 02-MAY-00 02-MAY-01 0 1 HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488

Re: [R] Constrained Optimization

2009-11-04 Thread Berwin A Turlach
: http://cran.r-project.org/web/views/Optimization.html HTH. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self

Re: [R] acf gives correlations 1

2009-09-14 Thread Berwin A Turlach
address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009

Re: [R] Constrained fits: y~a+b*x-c*x^2, with a,b,c =0

2009-05-27 Thread Berwin A Turlach
to solve what is known as a quadratic program, and there are at least two quadratic programming solvers (ipop in kernlab and solve.qp in quadprog) available for R. HTH. Cheers, Berwin === Full address = Berwin A Turlach

Re: [R] Getting lm() to work with a matrix

2009-05-20 Thread Berwin A Turlach
G'day Luc, On Wed, 20 May 2009 09:58:41 -0400 Luc Villandre villa...@dms.umontreal.ca wrote: MikSmith wrote: [...] Indeed, functions like /lm()/ require the object fed to the /data/ argument to be either [...] But the data argument is optional and does not need to be specified. In your

Re: [R] Unintended loading of package:datasets

2009-05-10 Thread Berwin A Turlach
G'day David, On Sun, 10 May 2009 17:17:38 -0400 David A Vavra dava...@verizon.net wrote: The dataset package is being loaded apparently by one of the packages that I am using. The loading of the datasets takes a long time and I would like to eliminate it. I thought the datasets were

Re: [R] Unintended loading of package:datasets

2009-05-10 Thread Berwin A Turlach
G'day David, On Sun, 10 May 2009 21:35:30 -0400 David A Vavra dava...@verizon.net wrote: Thanks. Perhaps something else is going on. There is a large time period (about 20 sec.) after the message about loading the package. More investigation, I suppose. What R version are you using? I do

Re: [R] Beyond double-precision?

2009-05-09 Thread Berwin A Turlach
)) - logadd(-lx) [1] -1.600885 Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science

Re: [R] Splitting a vector into equal groups

2009-05-04 Thread Berwin A Turlach
=== Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept of Statistics and Applied Probability+65 6516 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6

Re: [R] The .tex version of the manual in foo.Rcheck

2009-04-29 Thread Berwin A Turlach
G'day Uwe, On Wed, 29 Apr 2009 11:03:43 +0200 Uwe Ligges lig...@statistik.tu-dortmund.de wrote: you can also take a source package an run R CMD Rd2dvi --no-clean packageName on it and you will get a temporary directory with the TeX sources in it. Which is fine for manual processing and

Re: [R] The .tex version of the manual in foo.Rcheck

2009-04-28 Thread Berwin A Turlach
. But this can easily be changed by moving two lines in the script a bit higher, see the attached patch. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept of Statistics and Applied

Re: [R] Unable to re-import a table that was just exported to a file

2009-04-27 Thread Berwin A Turlach
wishes, Berwin === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept of Statistics and Applied Probability+65 6516 6650 (self) Faculty of Science FAX : +65 6872

Re: [R] Eclipse and StatET Howto (also added Subversion, Rtools)

2009-04-05 Thread Berwin A Turlach
G'day Peter, On Sun, 05 Apr 2009 11:26:40 +0200 Peter Dalgaard p.dalga...@biostat.ku.dk wrote: Berwin A Turlach wrote: G'day Dirk, On Sat, 4 Apr 2009 20:27:22 -0500 Dirk Eddelbuettel e...@debian.org wrote: On 4 April 2009 at 14:37, Ken-JP wrote: Yes, I have x11-common installed

Re: [R] Code of sample() in C

2009-04-05 Thread Berwin A Turlach
; ++i) { const int j = (int)(len * runif(0.0, 1.0)); y[i] = x[j]; x[j] = x[--n]; } free(x); } return 0; } === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept

Re: [R] Eclipse and StatET Howto (also added Subversion, Rtools)

2009-04-04 Thread Berwin A Turlach
G'day Dirk, On Sat, 4 Apr 2009 20:27:22 -0500 Dirk Eddelbuettel e...@debian.org wrote: On 4 April 2009 at 14:37, Ken-JP wrote: Yes, I have x11-common installed, and dpkg -S /etc/X11/rgb.txt shows not found for me. This is on Ubuntu 8.10 amd64. Same 8.10 for both amd64 and i386 where I

  1   2   >