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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] Is it solve.QP or is it me?

2007-09-21 Thread Berwin A Turlach
scales. Try to divide the first two columns of A (and the first two entries in the vector b) by the square root of n. Hope that helps. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-19 Thread Berwin A Turlach
that it is the square of something, hence always non-negative, can become negative? Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515

Re: [R] indices of rows containing one or more elements 0

2008-02-12 Thread Berwin A Turlach
= 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 Science Drive 2, Blk S16, Level 7 e-mail

Re: [R] stumped by eval

2008-02-13 Thread Berwin A Turlach
G'day Peter, On Wed, 13 Feb 2008 08:03:07 +0100 Peter Dalgaard [EMAIL PROTECTED] wrote: Ross Boylan wrote: In the following example, the inner evaluation pulls in the global value of subset (a function) rather than the one I thought I was passing in (a vector). Can anyone help me

Re: [R] Quadratic Programming

2008-02-15 Thread Berwin A Turlach
/047636.html Hope this helps. Best wishes, Berrwin === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept of Statistics and Applied Probability+65 6516 6650 (self) Faculty of Science

Re: [R] Questions about EM algorithm

2008-02-19 Thread Berwin A Turlach
. Best wishes, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65

Re: [R] debugging a try() statement

2008-02-19 Thread Berwin A Turlach
example of the problematic code one finds the bug. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty

Re: [R] Constrained regression

2008-03-03 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] Strange paste, string or package problem?

2008-03-03 Thread Berwin A Turlach
that you are working in. But others would know more about this than I and can probably explain better what is going on. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept

Re: [R] Extracting formula from an lm object

2008-08-24 Thread Berwin A Turlach
HTH. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65 6872

Re: [R] Using R to generate reports

2008-09-05 Thread Berwin A Turlach
2008. Finally, check out: http://bioinformatics.oxfordjournals.org/cgi/content/full/24/2/276 Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied

Re: [R] problem with function rep

2008-06-12 Thread Berwin A Turlach
are. My money is on you having the same problem and that using round(B) instead of B in the rep() command will solve your problem. HTH. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65

Re: [R] bug in nls?

2008-06-26 Thread Berwin A Turlach
solution is a fix for your problem. 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] recursively divide a value to get a sequence

2008-07-09 Thread Berwin A Turlach
G'day all, On Wed, 09 Jul 2008 20:33:39 +1000 Jim Lemon [EMAIL PROTECTED] wrote: On Wed, 2008-07-09 at 11:40 +0200, Anne-Marie Ternes wrote: Hi, if given the value of, say, 15000, I would like to be able to divide that value recursively by, say, 5, and to get a vector of a determined

Re: [R] shapiro wilk normality test

2008-07-13 Thread Berwin A Turlach
://www.ncbi.nlm.nih.gov/pubmed/6829975 My money is on Frank having the first of these publications in mind. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept of Statistics

Re: [R] NAMESPACE vs internal.Rd

2008-07-16 Thread Berwin A Turlach
not be accessed directly by users (though they can via :::). Functions/objects that are not exported do not need to be documented, hence no need for the toto-internal.Rd stub. HTH (and HTIC). Cheers, Berwin === Full address = Berwin A Turlach

Re: [R] NAMESPACE vs internal.Rd

2008-07-16 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

Re: [R] calculate differences - strange outcome

2008-07-17 Thread Berwin A Turlach
. Best 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

Re: [R] NAMESPACE vs internal.Rd

2008-07-17 Thread Berwin A Turlach
G'day Christophe, On Wed, 16 Jul 2008 18:22:49 +0200 [EMAIL PROTECTED] wrote: Thanks for your answer. My pleasure. I guess writing a regular expression that says export everything that does not start with a dot but do not export foo and bar would be not trivial to write (at least not

Re: [R] truncated normal

2008-07-24 Thread Berwin A Turlach
) ## Take heed about Duncan's remark on ## evaluating such quantities p - p1/(p1+p2) ind - runif(100) p finalsample - samp1 finalsample[!ind] - samp2[!ind] HTH. Cheers, Berwin === Full address = Berwin A Turlach

Re: [R] problem with which

2008-04-23 Thread Berwin A Turlach
Is there a better function for non-integers ? which(sapply(tt, function(x) isTRUE(all.equal(x,1.7 [1] 8 seems to work. HTH. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept

Re: [R] Is my understanding of rlnorm correct?

2008-05-03 Thread Berwin A Turlach
would expect in the mean in the last example, the mean is actually close enough to the theoretical value of 100: R sqrt((exp(sd^2)-1)*exp(2*mu + sd^2)/1) [1] 36.77435 HTH. Cheers, Berwin === Full address = Berwin A Turlach

Re: [R] question about se of predicted glm values

2008-05-05 Thread Berwin A Turlach
-predict(my.glm, data.frame(x=b), se.fit=T, type=response) Hope this helps. Best wishes, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65

Re: [R] apply function

2008-05-15 Thread Berwin A Turlach
[1] logical $d [1] logical could be used. HTH. Best wishes, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty

Re: [R] glm model syntax

2008-05-16 Thread Berwin A Turlach
= Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16

Re: [R] Integer / floating point question

2008-05-16 Thread Berwin A Turlach
to a binary representation should not create problems. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty

Re: [R] Integer / floating point question

2008-05-16 Thread Berwin A Turlach
G'day Brian, On Fri, 16 May 2008 19:28:59 +0100 (BST) Prof Brian Ripley [EMAIL PROTECTED] wrote: 'numeric' is a class but not a type -- so I think the FAQ is wrongly worded but the concept is well defined Though there may be multiple definitions. :-) Reading a bit in R Language Definition

Re: [R] sum of unknown number of matrices

2008-06-04 Thread Berwin A Turlach
,]8 16 HTH. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX

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] 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] 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] 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] 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] 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] 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] rbinom with computed probability

2007-11-24 Thread Berwin A Turlach
address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk

Re: [R] Quadratic programming

2007-12-05 Thread Berwin A Turlach
; but do not forget to rescale the constraints accordingly. Or you might want to try another quadratic program solver in R, e.g. ipop() in package kernlab. Hope this helps. Best wishes, Berwin === Full address = Berwin A Turlach

Re: [R] Building package - tab delimited example data issue

2007-12-06 Thread Berwin A Turlach
in the future. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65

Re: [R] lm/model.matrix confusion (? bug)

2007-12-12 Thread Berwin A Turlach
-statistics. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX

Re: [R] Looking for simpler solution to probabilistic question

2008-01-15 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

Re: [R] lapply without return values?

2008-01-25 Thread Berwin A Turlach
= Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16

Re: [R] primitives again

2009-03-14 Thread Berwin A Turlach
G'day Edna, On Sat, 14 Mar 2009 22:52:38 -0500 Edna Bell edna.bel...@gmail.com wrote: Dear R Gurus: Well, I guess I can answer nevertheless. :) How do I find the functions which are primitives, please? ?is.primitive Thus, the following code would give you all the primitive functions in

Re: [R] builtin vs. closure

2009-03-14 Thread Berwin A Turlach
G'day Edna, On Sat, 14 Mar 2009 23:00:12 -0500 Edna Bell edna.bel...@gmail.com wrote: Anyway, my question now is: what determines if a function is a builtin vs. a closure, please? The help page of typeof states that: The possible values are listed in the structure 'TypeTable' in

Re: [R] primitives again

2009-03-15 Thread Berwin A Turlach
On Sun, 15 Mar 2009 14:23:40 +0100 Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote: Edna Bell wrote: How do I find the functions which are primitives, please? you can scan the whole search path for functions that are primitives: primitives = sapply(search(),

Re: [R] .Internal

2009-03-18 Thread Berwin A Turlach
G'day Kevin, On Wed, 18 Mar 2009 21:46:51 -0700 rkevinbur...@charter.net wrote: I was trying to find source for optimize and I ran across function (f, interval, ..., lower = min(interval), upper = max(interval), maximum = FALSE, tol = .Machine$double.eps^0.25) { if (maximum) {

Re: [R] If statement generates two outputs

2009-03-23 Thread Berwin A Turlach
. replacing := by %colec% and then issuing the command c(df1, df2) %colec% list(4:8, 9:13) will work. Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6516 4416 (secr) Dept of Statistics

Re: [R] .Internal

2009-03-23 Thread Berwin A Turlach
no problems with understanding the names of those macros. Since I never became comfortable with those languages, I restrict myself to .C and .Call; YMMV. HTH. Cheers, Berwin === Full address = Berwin A TurlachTel

Re: [R] Converting a Matrix to a Vector

2009-03-25 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

Re: [R] Conerned about Interfacing R with Fortran

2009-03-26 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

Re: [R] Bug? FORTTRAN help

2009-03-26 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

Re: [R] [OT ?] rant (was : Re: Conversions From standard to metricunits)

2009-04-03 Thread Berwin A Turlach
... That's when I thought that the metric system is so much safer until I ordered my next beer, according to the menu a bottled beer of 400ml, it came in a 333ml bottle... Cheers, Berwin === Full address = Berwin A Turlach

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

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] 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] definition of a function

2008-10-28 Thread Berwin A Turlach
) Is there a way to plot it symbolically, without using x as a vector? e.g. x - seq(from=-10, to=10, length=100) plot(x, Fun(x)) curve(Fun, from=-10, to=10, n=100) HTH. Cheers, Berwin === Full address = Berwin A Turlach

Re: [R] odd behaviour of identical

2008-11-01 Thread Berwin A Turlach
minor 7.0 year 2008 month 04 day22 svn rev45424 language R version.string R version 2.7.0 (2008-04-22) Cheers, Berwin === Full address = Berwin A Turlach

Re: [R] chi square table

2008-11-06 Thread Berwin A Turlach
and does not help students at all. It just panders to intellectual laziness of (some) students and shows a great deal of confusion on the side of the authors. I would search another textbook rand off Cheers, Berwin === Full address = Berwin

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
G'day Duncan, On Tue, 11 Nov 2008 09:37:57 -0500 Duncan Murdoch [EMAIL PROTECTED] wrote: I think this tension is a fundamental part of the character of S and R. But it is also fundamental to R that there are QC tests that apply to code in packages: so writing new tests that detect dangerous

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
= 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 Science Drive 2, Blk S16, Level 7 e-mail

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
On Tue, 11 Nov 2008 11:27:30 +0100 Wacek Kusnierczyk [EMAIL PROTECTED] wrote: Berwin A Turlach wrote: Why is it worth asking this if nobody else asks it? Most notably a certain software company in Redmond, Washington, which is famous for carrying on with bad designs and bugs all

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
= 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 Science Drive 2, Blk

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
= Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16, Level

Re: [R] R design (was Variable passed to function not used in function in select)

2008-11-11 Thread Berwin A Turlach
G'day Peter, On Wed, 12 Nov 2008 00:42:36 +0100 Peter Dalgaard [EMAIL PROTECTED] wrote: On 12/11/2008, at 11:29 AM, Peter Dalgaard wrote: Not that one again! For at least one other value of one, the expectation is the opposite: Factor levels do not go away just because they happen not

Re: [R] licensing of R packages

2008-11-14 Thread Berwin A Turlach
a word with them about the price they were asking? Cheers, Berwin === Full address = Berwin A TurlachTel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability+65 6515 6650 (self) Faculty

Re: [R] licensing of R packages

2008-11-14 Thread Berwin A Turlach
G'day Brian, On Fri, 14 Nov 2008 11:47:46 + (GMT) Prof Brian Ripley [EMAIL PROTECTED] wrote: On Fri, 14 Nov 2008, Duncan Murdoch wrote: I think they are talking about cases where the GPL libraries are compiled into the new product. Packages generally don't include copies of anything

Re: [R] licensing of R packages

2008-11-14 Thread Berwin A Turlach
G'day Duncan, On Fri, 14 Nov 2008 11:16:35 -0500 Duncan Murdoch [EMAIL PROTECTED] wrote: On 11/14/2008 11:01 AM, Berwin A Turlach wrote: But I remember that a situation as you describe was hotly debated on gnu.misc.discuss in the mid-90s; thus, I am talking obviously GPL 2. Unfortunately

Re: [R] licensing of R packages

2008-11-14 Thread Berwin A Turlach
G'day Duncan, On Fri, 14 Nov 2008 12:36:15 -0500 Duncan Murdoch [EMAIL PROTECTED] wrote: On 11/14/2008 11:57 AM, Carlos Ungil wrote: And the copyright owners have recourse to legal action if they think there is a license violation. Again, I don't know what a court would decide, but if

Re: [R] licensing of R packages

2008-11-14 Thread Berwin A Turlach
G'day Duncan, On Fri, 14 Nov 2008 13:37:20 -0500 Duncan Murdoch [EMAIL PROTECTED] wrote: What is so special about binaries? First, with binaries it is (presumably) easier to define when one piece of software is part of another. Secondly, I presume that the software that started this thread

Re: [R] licensing of R packages

2008-11-15 Thread Berwin A Turlach
G'day Duncan, On Fri, 14 Nov 2008 15:24:03 -0500 Duncan Murdoch [EMAIL PROTECTED] wrote: Moreover, if you write a C/C++ program that makes use of GNU extensions, you'd be in violation of the GPL if you were to distribute it without GPLing it. Even the FSF doesn't believe that:

  1   2   >