Re: [R] Subset and plot

2010-02-02 Thread Rolf Turner
27;. Since you have specified three plotting symbols and ``Tanks'' has *four* distinct values, this is somewhat mysterious. If you would just tell us what you are actually trying to *do* we would probably be able to tell you how to do it. cheers,

Re: [R] pickle in R

2010-02-03 Thread Rolf Turner
than you have a function where you can retrieve the object from that > file later on. ?dput ?dget cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and co

Re: [R] open script file from command line

2010-02-04 Thread Rolf Turner
he script. In which case see ?source. One can also ``send commands to the console'' via copy-and-paste. cheers, Rolf Turner ## Attention: This e-mail message is privileged and confidential. If you are not th

Re: [R] unique function works funny

2010-02-04 Thread Rolf Turner
FAQ 7.31 cheers, Rolf Turner On 5/02/2010, at 4:23 PM, Guochen Song wrote: > I have 3 nested functions, the core function goes like this: > listx<-function(x,tox) > { > xt=table(x) > wa=sort(unique(x,fromLast=FALSE)) > print(xt) > print(

Re: [R] x-axis plot problem

2010-02-07 Thread Rolf Turner
I think you just need to set axes=FALSE in your call to matplot(). You'll then need to add the y-axis manually --- do axis(2) in addition to your call which draws the x axis. You'll also need to do box() if you want a box around your graph. cheers, Rolf Tu

Re: [R] object 'xxx' not found

2010-02-08 Thread Rolf Turner
oop increases. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Solving a simple linear equation using uniroot give error object 'x' not found

2020-10-06 Thread Rolf Turner
blem. I am curious to know why on earth you are loading the rootSolve package. The uniroot() function is in package "stats" which is automatically available. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 8827

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Rolf Turner
in% finds no matches. Perhaps: b <- celFiles[!basename(celFiles) %in% paste0(as.character(remove$V1),".CEL")] Note that, for the data that you have presented, none of the entries of celFiles "match up" with &qu

Re: [R] vanilla session in R Gui or RStudio

2020-10-22 Thread Rolf Turner
orgoing is *exactly* correct. Perhaps it depends on what is meant by "objects associated with packages". I have vague recollections that funny things can happen if objects in the saved .RData file have complicated environments, but I can't remember details. cheers, Rolf Turner

Re: [R] analyzing results from Tuesday's US elections

2020-11-13 Thread Rolf Turner
Has anyone any explanation for this? Any ideas? cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see ht

Re: [R] analyzing results from Tuesday's US elections

2020-11-14 Thread Rolf Turner
On Fri, 13 Nov 2020 19:02:19 -0800 Jeff Newmiller wrote: > It was explained in the video... his counts were so small that they > spanned the 1-9 and 10-99 ranges. Sorry, missed that. I'll have to watch the video again. Thanks. cheers, Rolf > > On November 13, 2020 6:5

Re: [R] Inappropriate color name

2020-11-16 Thread Rolf Turner
On Tue, 17 Nov 2020 07:54:01 +1100 Jim Lemon wrote: > Hi Elaine, > There seems to be a popular contest to discover offence everywhere. I > don't think that it does anything against racism, sexism or > antidisestablishmentarianism. Words are plucked from our vast lexicon > to comfort or insult o

Re: [R] Values of ACF and PACF

2020-11-20 Thread Rolf Turner
set.seed(42) x <- rnorm(300) ax0 <- acf(x,plot=FALSE) # The "plot=FALSE" is not actually necessary. ax1 <- ax0$acf[,,1] Reading the help file for a function is Always a Good Idea. You can also always look at the code. Just type: acf Similarly for pacf() cheers, Rolf Tu

Re: [R] the invisible question

2020-11-22 Thread Rolf Turner
On Mon, 23 Nov 2020 10:07:42 +1100 Jim Lemon wrote: > Hi all, > I have encountered a problem in some emails with invisible characters > in code snippets that throw an error when pasted into the terminal > window: > > Error: unexpected input in: > "star_wars_matrix<-matrix(box_office,nrow=3,byr

[R] A new versatile discrete distribution.

2020-11-30 Thread Rolf Turner
I would of course be grateful for any feedback, comments, criticisms, corrections, etc. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org mailing l

[R] Subscript and superscript on one symbol; plotmath.

2020-12-09 Thread Rolf Turner
p(scriptstyle(2),scriptstyle(11 and again this "sort of" works but places the putative superscript a bit too high and the putative subscript a bit too low. Is there any way to achieve, with plotmath, an effect like unto that produced by the LaTeX expression $\sigma^2_{11}$? Or should I

Re: [R] Subscript and superscript on one symbol; plotmath.

2020-12-09 Thread Rolf Turner
On Wed, 9 Dec 2020 06:18:10 -0500 Duncan Murdoch wrote: > On 09/12/2020 3:06 a.m., Rolf Turner wrote: > > > > I would like to produce, as graphical annotation, the Greek letter > > sigma with a superscript of 2 and a subcript of 11. (I.e. the top > > left hand e

[R] nls() syntax

2020-12-11 Thread Rolf Turner
hould be doing, but I can't work out what it is. Does there *exist* an appropriate syntax for doing what I want to do? Can anyone enlighten me? The data set "xxx" is given in dput() form at the end of this message. cheers, Rolf Turner -- Honorary Research Fellow Department of Sta

Re: [R] nls() syntax

2020-12-11 Thread Rolf Turner
On Fri, Dec 11, 2020 at 6:51 PM Rolf Turner > wrote: > > > > > > > > I want to fit a model y = x/(x-a) where the value of a depends > > on the level of a factor z. I cannot figure out an appropriate > > syntax for nls(). The "parameter" a (to

Re: [R] Meta: R-Help reply-to

2020-12-17 Thread Rolf Turner
On Thu, 17 Dec 2020 09:00:52 +0100 Martin Maechler wrote: > As Jeff mentions -- and as I have experienced myself also > (rarely) -- when mailing lists are configured differently, their > behavior is much more confusing and for many list recipients > it becomes almost impossible to reply to ju

[R] Updated version of the hse package.

2021-01-06 Thread Rolf Turner
now been corrected, and the corrected version of the help will appear in the next release. However I'm sure that there are many more such glitches that I *haven't* noticed! I would be very grateful to anyone who points out such errors to me. cheers, Rolf Turner -- Honorary Resea

Re: [R] arima/fixed

2021-01-29 Thread Rolf Turner
27;s fixed. I hope this helps. Perhaps someone who actually knows what they are talking about will chime in. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-he

Re: [R] readline in function call with space in prompt.

2021-02-08 Thread Rolf Turner
the expected behavior or am I missing something? Works fine for me, with or without the space in the prompt string. There *must* be something flaky in your system, but I'm damned if I can come up with any useful suggestions for tracking down just where

[R] Help with regular expressions.

2021-02-08 Thread Rolf Turner
ing all "."s to "-"s, and then do a sub() changing the first "-" back to a ".". But this seems very kludgy. There must be a sexier way. Mustn't there? Is there regular expression syntax for picking out the second occurence of a particular string?

Re: [R] Help with regular expressions.

2021-02-08 Thread Rolf Turner
David Wolfskill's post solved my problem perfectly. Thanks. Thanks also to Bert Gunter and Avi Gross. cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.or

Re: [R] Help with regular expressions.

2021-02-08 Thread Rolf Turner
On Tue, 9 Feb 2021 17:34:00 +1300 Rolf Turner wrote: > > David Wolfskill's post solved my problem perfectly. Thanks. > > Thanks also to Bert Gunter and Avi Gross. Whoops. David Wolfskill's message came to me off-list. Sorry for the confusion. cheers, Rolf -- Ho

[R] Dimensioning lists.

2021-02-14 Thread Rolf Turner
the desired object, *not* wrapped in a list, i.e.: > $a > [1] "n" > > $b > [1] 20 > (which is what I get by typing xxx[2,3][[1]]). Is there any way to prevent the entries of xxx from being wrapped up in lists of length 1? Thanks for any enlightenment. cheers, Rolf

Re: [R] [External] Dimensioning lists.

2021-02-15 Thread Rolf Turner
See fortunes::fortune(341) for a relevant comment. :-) Thanks again. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

[R] Off topic --- underdispersed (pseudo) binomial data.

2021-03-24 Thread Rolf Turner
artificial) but I'd like to get my hands on a *real* example, if possible. Grateful for any pointers/suggestions. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __

Re: [R] Off topic --- underdispersed (pseudo) binomial data.

2021-03-24 Thread Rolf Turner
failure. > > What have I misunderstood? And then, following up: > Oh, I think I get what you mean -- you are drawing repeated samples > from a binomial with n trials and you are counting the number of > successes for each. Yes. Exactly. Sorry if my post was unclear. cheers, Rolf Turner

Re: [R] Off topic --- underdispersed (pseudo) binomial data.

2021-03-25 Thread Rolf Turner
On Fri, 26 Mar 2021 13:41:00 +1300 Abby Spurdle wrote: > I haven't checked this, but I guess that the number of students that > *pass* a particular exam/subject, per semester would be like that. > > e.g. > Let's say you have a course in maximum likelihood, that's taught once > per year to 3rd

Re: [R] add cex.axis =1.2 to qqunif.plot from lattice library

2021-03-27 Thread Rolf Turner
xample illustrating the problem, and someone on this list will probably be able to help you. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-proje

Re: [R] Error in n * rvec : non-numeric argument to binary operator

2021-04-19 Thread Rolf Turner
e_size=nvec,attained_power=kbpower)) > } > > Can you please advise, There is no "rvec" anywhere in the code that you provided, so the error is coming from somewhere else. I ran your code and got: > $sample_size > [1] 25 10 15 > > $attained_power > [1] 0.84044

[R] Package "hse" has been REPLACED by package "dbd".

2021-04-30 Thread Rolf Turner
fect that the package is deprecated and that users should install and utilse the dbd package instead. The dbd package includes a number of modifications which (it is to be hoped) make it an improvement over the hse package that it replaces. I would be grateful to anyone who points out any problems

Re: [R] Package "hse" has been REPLACED by package "dbd".

2021-05-05 Thread Rolf Turner
On Mon, 3 May 2021 12:42:30 +1200 Abbs Spurdle wrote: > Previously, I disliked some of R's names. > e.g. Action of the Toes. > But then later realized toes are really important. > > I don't want to disagree with a 'reviewer'. > But I would say subtle references to literature and philosophy > d

Re: [R] Create a function problem

2021-05-14 Thread Rolf Turner
lt.tr_Test.Result1". Why did you expect it to be present? Moreover, the code of your function makes no sense at all, at least not to *my* feeble brain. The quantities "raw", "Pedigree.name" and "UPN" are not arguments of your function. How do you expect k_s

Re: [R] Create a function problem

2021-05-14 Thread Rolf Turner
On Sat, 15 May 2021 00:55:08 + (UTC) Kai Yang wrote: > Hi Rolf, > I am a beginner for R. Then I suggest that you spend some time learning basic R syntax, with the help of some of the excellent online tutorials. "An Introduction to R" from https://cran.r-project.org/manuals.html would be a g

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-06 Thread Rolf Turner
UE, FALSE) > > object[index] > [1] 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 > 45 47 49 51 53 55 57 > [30] 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 Why faff around with ifelse()? object[object %% 2 == 1] works just fine. cheers,

Re: [R] with replace na with 0?

2021-06-11 Thread Rolf Turner
# TRUE As has been pointed out, you should include a minimal reproducible example in questions such as this. Creating such an example almost always reveals the source of the problem so that you can solve it yourself. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics Univ

Re: [R] Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm)

2021-06-26 Thread Rolf Turner
contributed package, you should in the first instance contact the maintainer of the package rather than this list. Only if you get no response from the maintainer should you appeal to the list. You can find the email address of the maintainer by typing maintainer(). (4) From the error message I w

[R] Plotting the ASCII character set.

2021-07-02 Thread Rolf Turner
is the hex encoding of the degree symbol; apparently 260 is the octal encoding of this symbol. Can anyone suggest how I might get my plot_ascii() function working again? Basically, it seems to me, the question is: how do I persuade R to read in "\260" as "\ub0" rather than &qu

Re: [R] Plotting the ASCII character set.

2021-07-03 Thread Rolf Turner
On Sat, 3 Jul 2021 09:40:28 +0200 Ivan Krylov wrote: > Hello Rolf Turner, > > On Sat, 3 Jul 2021 14:02:59 +1200 > Rolf Turner wrote: > > > Can anyone suggest how I might get my plot_ascii() function working > > again? Basically, it seems to me, the question is:

Re: [R] problem for strsplit function

2021-07-07 Thread Rolf Turner
you want the first entry of this result, i.e. "clyde". My "sapply()" construction produces the first entry of each entry of the list produced by strsplit(). It is useful to get your thoughts clear, understand what you are doing and understand what the functions that you are using do.

Re: [R] Plotting the ASCII character set.

2021-07-07 Thread Rolf Turner
h as "graphics::text() rather than just text(). I guess it never hurts to be cautious. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 plotASCII <- function (extended = TRUE, cex = graphics::par("cex

Re: [R] problem for strsplit function

2021-07-09 Thread Rolf Turner
This discussion has developed in such a way that it seems a better subject line would be "problem for the hairsplit function". :-) cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599

[R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-17 Thread Rolf Turner
quot;. This file was produced by dput() so read it in using dget("egData.txt"). With eternal gratitude. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 eg.pdf Description: Adobe PDF document structure

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-19 Thread Rolf Turner
Thanks to Jeff Newmiller, Rui Barradas and Avi Gross for their extremely helpful replies. I have got both Jeff's and Rui's code to run. I am currently experimenting with Avi's suggestion of producing multiple plots and then putting them together using plotgrid() or grid.arrange(). This idea s

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-20 Thread Rolf Turner
Thanks to Bill Dunlap and Avi Gross for their clear and helpful answers to my questions. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-08-02 Thread Rolf Turner
necessary data set in the file egDat.txt. Just in case anyone is interested or in case someone else might benefit from seeing this code. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 # # Script ciPlot.txt for doing the

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-08-02 Thread Rolf Turner
On Mon, 2 Aug 2021 17:53:34 +0100 Rui Barradas wrote: > Hello, > > I'm glad it helped. > Here are a couple of ideas for theme. Thanks Rui. The scope of your knowledge and understanding is simply amazing! cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Au

[R] No "doc" directory in my installation of R.

2021-08-07 Thread Rolf Turner
the latest version. I remark that I am running Ubuntu 20.04 with a Mate 1.20.4 desktop. How can I get a "doc" directory into my R directory and make Rstudio happy? cheers, Rolf Turner P.S. I have also tried to ask about this on the Rstudio community forum, but it seems to me t

Re: [R] No "doc" directory in my installation of R.

2021-08-09 Thread Rolf Turner
plus Duncan's off-list response. Does this say something about the efficacy of mailing lists as contrasted with web site fora? Or is it just a difference between the R community and the Rstudio community? cheers, Rolf Turner -- Honorary Research Fellow Department of Sta

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Rolf Turner
;t use Excel!!! This is a corollary of a more general theorem: Don't use Micro$oft!!! cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org

[R] A glitch (???) in tools::texi2pf.

2021-08-27 Thread Rolf Turner
iew mreprex.pdf. You will see that the version number is given as 0.0-22 as it should be. Should this be considered a bug? If so, what is the appropriate way of drawing this to the attention of those who have the power to fix it? Thanks. cheers, Rolf Turner -- Honorary Research Fellow Dep

Re: [R] A glitch (???) in tools::texi2pf.

2021-08-28 Thread Rolf Turner
On Sat, 28 Aug 2021 09:47:03 +0200 Achim Zeileis wrote: > On Sat, 28 Aug 2021, Rolf Turner wrote: > > > I have found that tools::texi2pf() ignores changes to the *.bib file > > unless the *.bbl file is removed prior to re-running > > tools::texi2pdf(). > > Thi

[R] Configure error: checking if libcurl supports https... no

2021-08-28 Thread Rolf Turner
one got any *useful* advice? If so, please present it in very simple terms if you can. (I am a Bear of Very Little Brain, and long words bother me.) A step-by-step recipe would be appreciated. I'm running Ubuntu 20.04, with a Mate 1.24.0 desktop. Grateful for any pearls of wisdom.

Re: [R] A glitch (???) in tools::texi2pf.

2021-08-28 Thread Rolf Turner
rovide a template/prototype Makefile and give me some idea what to *do* with it? cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org mailing list -- To UNS

[R] What if there's nothing to dispatch on?

2021-08-31 Thread Rolf Turner
x" in "data"). Is there any way to tell the generic to do this? Or is there any other way out of this dilemma? (Other than "Give up and go to the pub", which I cannot currently do since Auckland is in Level 4 lockdown. :-) ) Thanks for any enlightenment. cheers, Ro

Re: [R] What if there's nothing to dispatch on?

2021-09-01 Thread Rolf Turner
On Wed, 1 Sep 2021 05:35:03 -0400 Duncan Murdoch wrote: > On 31/08/2021 11:59 p.m., Rolf Turner wrote: > > > > I'm trying to build a pair of (S3) methods, a "formula" method and a > > "default" method. The methods have a "data" argume

Re: [R] What if there's nothing to dispatch on?

2021-09-02 Thread Rolf Turner
On Wed, 1 Sep 2021 19:29:32 -0400 Duncan Murdoch wrote: > I don't know the header of your foo() method, but let's suppose foo() > is > >foo <- function(x, data, ...) { > UseMethod("foo") >} > > with > >foo.formula <- function(x, data, ...) { > # do something with the

Re: [R] How to remove all rows that have a numeric in the first (or any) column

2021-09-14 Thread Rolf Turner
to be non-numeric. Some of them *may* be interpretable as being numeric. If you apply as.numeric() to a column you'll get NA's for all entries that *cannot* be interpreted as numeric. So you may want to do something like (untested, of course): ok <- is.na(

Re: [R] how to remove factors from whole dataframe?

2021-09-19 Thread Rolf Turner
ating what you a trying to accomplish. You are asking others for help. Have a little consideration for the helpers, who are giving of their time and effort free of charge! (c) Note that "df" is a lousy name for a data frame, since it is the name of a base R function (the density functio

[R] NA values for "col"

2021-09-27 Thread Rolf Turner
> Some functions such as lines and text accept a vector of values which > are recycled and may be interpreted slightly differently. So I guess differences in behaviour are hinted at. I'm still curious! Any thoughts from anyone? cheers, Rolf Turner -- Honorary Research Fellow D

Re: [R] NA values for "col"

2021-09-27 Thread Rolf Turner
On Mon, 27 Sep 2021 14:54:53 -0700 Bert Gunter wrote: > ... and also note in the *Color Specification* section of ?par, to > which ?points points, > > "Additionally, "transparent" is transparent, useful for filled areas > (such as the background!), and just invisible for things like lines or > t

[R] Rdversion ???

2021-09-28 Thread Rolf Turner
its presence in a number of help files for other packages. Can anyone explain to me what it's for, and what its provenance is? Is it important? Thanks for any enlightenment. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-

Re: [R] Rdversion ???

2021-09-29 Thread Rolf Turner
On Tue, 28 Sep 2021 16:02:55 -0700 Bill Dunlap wrote: > tools:::prepare2_Rd contains the lines > ## FIXME: we no longer make any use of \Rdversion > version <- which(sections == "\\Rdversion") > if (length(version) > 1L) > stopRd(Rd[[version[2L]]], Rdfile, >"

Re: [R] assumptions about how things are done

2021-10-10 Thread Rolf Turner
On Sun, 10 Oct 2021 19:27:27 +1300 "Richard O'Keefe" wrote: > Why is it so hard to understand that there is nothing special to > understand here? Fortune nomination. cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 8827

Re: [R] unexpected behavior in apply

2021-10-11 Thread Rolf Turner
On Mon, 11 Oct 2021 09:15:27 + PIKAL Petr wrote: > > data.frame is not matrix or array (even if it rather resembles one) > > So if you put a cake into oven you cannot expect getting fried > potatoes from it. Another fortune nomination! cheers, Rolf -- Honorary Research Fellow Depar

[R] New version of the deldir package.

2021-10-16 Thread Rolf Turner
been changed slightly, but most (for some value of "most") calls made with the previous syntax should still work. When the unexpected happens, read the help!!! cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599

[R] New version of mixreg.

2021-10-16 Thread Rolf Turner
nt that this package will now be much more useful than it was previously. Enjoy! :-) cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org mailing list -

Re: [R] Need help in R

2021-10-26 Thread Rolf Turner
tion 2 > Create a matrix of size 3x3 called mat_1: > > Iterate over all the values one by one and print the element as well > as the position in the matrix (row, col) You really should do your own homework. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics

[R] The "inset" argument in legend().

2021-10-29 Thread Rolf Turner
osition, but that causes an error to be thrown. I want to have a near the bottom of the plot and to adjust its position, in the horizontal direction by means of "inset", but nothing that I try has the desired effect. Am I misunderstanding something? Or is there perhaps a bug in legend

[R] Environmental oddity.

2021-11-06 Thread Rolf Turner
st curious (idly?) as to *why* the association of the namespace:stats environment with d1() causes it to "do the right thing". Can anyone give me any insight? Ta. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276

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

2021-11-06 Thread Rolf Turner
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 cheers, Rolf P.S.: > sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.3 LTS Matrix product

Re: [R] Environmental oddity.

2021-11-07 Thread Rolf Turner
On Sun, 7 Nov 2021 13:11:10 -0500 Duncan Murdoch wrote: > I've submitted a bug report and patch: > > https://bugs.r-project.org/show_bug.cgi?id=18232 Thanks Duncan. It's good to know that the anomaly wasn't just a result of my doing something stupid. cheers, Rolf -- Honorary Research Fe

Re: [R] the opposite of pluck() in purrr

2021-11-18 Thread Rolf Turner
it yourself, especially given that it's so easy in this instance? Use mung[[1]] to get the first entry of a list named "mung". Or mung[1] of one if you want a *list* whose sole entry is the first entry of mung. Likewise mung[-1] will give you the "all but" results. Fewer key s

[R] Predictably puzzled.

2021-11-19 Thread Rolf Turner
have as I would like, by specifying an appropriate value for na.action? I could not find such an appropriate value. Thanks for any enlightenment. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-

Re: [R] Predictably puzzled.

2021-11-19 Thread Rolf Turner
On Fri, 19 Nov 2021 18:35:23 -0800 Bert Gunter wrote: > ?predict.lm says: > > "predict.lm produces predicted values, obtained by evaluating the > regression function in the frame newdata (which defaults to > model.frame(object)). " > > model.frame(fit) is: > 1 1.37095845 -0.30663859 > 2 -0

Re: [R] how to plot numeric variable against several categories with lattice bwplot?

2022-01-16 Thread Rolf Turner
t;; I wanted one "standing up". After a great deal more struggle I did crud <- factor(rep(1,42),labels="") bwplot(junk ~ crud,ylab="") which gave me what I was after. Perhaps others who are more knowledgeable than I could chip in with better ideas. But first Luig

Re: [R] unbalanced design in multifactor anova....

2022-01-28 Thread Rolf Turner
hypotheses. This requires that you think! And that you actually understand what problem you are trying to solve. Analysis of variance can be a subtle concept. Some insight into the subtleties might be obtained by reading Bill Venables' paper: http://www.stats.ox.ac.uk/pub/MASS3/Exegeses

[R] Stack smashing again.

2022-04-10 Thread Rolf Turner
d into Fortran. The Ratfor code is much more perspicuous, so I have included the corresponding *.r files so as to possibly provide some enlightenment. If you have ratfor on your system, you can do things like "ratfor getgl.r > getgl.f" to recreate the *.f files. Thanks for any assistanc

[R] Thanks to this list ....

2022-07-14 Thread Rolf Turner
ot;. See the subtle difference? :-) The variable nvym1 was never initialised, so it took on strange values plucked out of RAM, I guess. Whence the anomaly. Once I corrected that trivial typo, things were OK. Thanks everybody!!! :-) cheers, Rolf Turner P.S. What I can't figure out (and won&#x

Re: [R] Error generated by nlme::gnls

2022-07-23 Thread Rolf Turner
-1 + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11" I could of course be missing something, but it really looks to me as if something has gone up to Puttee here. Some input from someone in R-Core would be valuable here. cheers, Rolf Turner -- Honorary Research Fellow Departmen

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread Rolf Turner
On Thu, 28 Jul 2022 00:42:51 + "Ebert,Timothy Aaron" wrote: > Time is often used in this sort of problem, but really time is not > relevant. A better choice is accumulated thermal units. The insect > will molt when X thermal units have been accumulated. This is often > expressed as degree d

Re: [R] how to add count to pie chart legend

2022-08-15 Thread Rolf Turner
On Mon, 15 Aug 2022 19:20:28 -0700 Bert Gunter wrote: > Fortune Nomination! > > "A lot of work for a little pie." (in response to a query about how to > improve a pie chart) > -- Jim Lemon I second the nomination. cheers, Rolf > > On Mon, Aug 15, 2022 at 6:43 PM Jim Lemon > wrote: > > >

Re: [R] nlme gls issue

2022-09-16 Thread Rolf Turner
ortune(254), although not directly applicable, might be relevant. :-) If you *really* believe that r-squared makes some kind of sense in the context of *generalised* least squares, you should probably direct further enquires to r-sig-mixed-models. cheers, Rolf Turner -- Honorary Research Fellow D

Re: [R] How long does it take to learn the R programming language?

2022-09-27 Thread Rolf Turner
On Mon, 26 Sep 2022 11:14:57 +0800 Turritopsis Dohrnii Teo En Ming wrote: > Subject: How long does it take to learn the R programming language? > > Good day from Singapore, > > How long does it take to learn the R programming language? How long is a piece of string? :-)

Re: [R] Getting "Error in ect, plot.new has not been called yet" despite grouping plot call

2022-10-05 Thread Rolf Turner
. cheers, Rolf Turner On Tue, 4 Oct 2022 23:35:09 + "Deramus, Thomas Patrick" wrote: > Sorry to cross-post on Stackoverflow and here but I'm having some > difficulty. > https://stackoverflow.com/questions/73942794/still-getting-error-in-ect-plot-new-has-not-been-cal

Re: [R] Getting "Error in ect, plot.new has not been called yet" despite grouping plot call

2022-10-05 Thread Rolf Turner
implemovingaverage) > abline(v = index(original_series[WordFrame[i,7]]),lty=2, > col='green', lwd=3) title(paste("Word Task Acquisition for Subject")) > dev.off() > } > #If the three tests are NOT statistically significant, generate a > plo

Re: [R] Unexpected result for df column $ subset with non-existent name

2022-10-28 Thread Rolf Turner
On Fri, 28 Oct 2022 16:42:41 +0100 Rui Barradas wrote: > This behavior, partial matching of column or list members names when > extracting with `$` is practically a FAQ. > See the latest R-Help thread on it after the release of R 4.0 > > > https://stat.ethz.ch/pipermail/r-help/2020-May/46714

[R] AIC

2022-11-25 Thread Rolf Turner
n from stackexchange, but you will have to make your question much clearer and much more explicit. Give a reasonably detailed example. Do not expect your readers to be telepathic. It is not at all clear to me that your question actually makes any sense at all. cheers, Rolf Turner -- Honorary Research

Re: [R] Select dataframe row containing a digit

2022-11-30 Thread Rolf Turner
te that I have changed the name of your data frame from "df" to "X", since df() is a built-in R function (density of the F-distribution). See fortunes::fortune("might clash"). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auck

[R] Partial matching with $ extractor.

2023-01-24 Thread Rolf Turner
get 3 (the "right" answer; the same as junk[["y"]]). When I do junk$yu I get NULL (just as if I'd done junk[["yu"]]). So: has something changed, or am I miss-remembering, or am I completely confused about the whole issue? Thanks for any enlightenment. cheers,

Re: [R] Partial matching with $ extractor.

2023-01-24 Thread Rolf Turner
On Tue, 24 Jan 2023 17:16:44 -0500 Andrew Simmons wrote: > I tried this again with R 2.15.3, the oldest version I have installed, > and I still got the same behaviour. It extracts the first exact match, > then the only partial match, then NULL. Thanks for that. I am *sure* that I had problems

Re: [R] Extracting data using subset function

2023-02-05 Thread Rolf Turner
length(p)) <= 20) This works, but makes a mountain out of a molehill. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __

Re: [R] Extracting data using subset function

2023-02-05 Thread Rolf Turner
On Sun, 5 Feb 2023 15:13:54 -0500 Duncan Murdoch wrote: > > Just to build the mountain a little higher, I would use > >subset(p, seq_along(p) <= 20) > > You should generally avoid expressions like "1:length(p)", because > they don't do what you would expect in the unusual case that p is

Re: [R] Removing variables from data frame with a wile card

2023-02-12 Thread Rolf Turner
On Sun, 12 Feb 2023 14:57:36 -0800 Jeff Newmiller wrote: > x["V2"] > > is more efficient than using drop=FALSE, and perfectly normal syntax > (data frames are lists of columns). I never cease to be amazed by the sagacity and perspicacity of the designers of R. I would have worried that x[

[R] Message produced under R 3.6.0.

2019-04-29 Thread Rolf Turner
ysterious and cryptic) pronouncement? I don't understand it at all. My package makes no use of ggplot2, dplyr or xts. Should I be worried? Are there adjustments that I should make to my package (e.g. to NAMESPACE)? Thanks for any tips. cheers, Rolf Turner -- Honorary Research Fellow De

Re: [R] Message produced under R 3.6.0.

2019-04-29 Thread Rolf Turner
iggered by loading my package. So that is the source of the problem. If it is indeed a problem. The question remains: is this message something that I (or the maintainer of brms) should be worried about? cheers, Rolf On Mon, Apr 29, 2019 at 3:55 PM Rolf Turner <mailto:r.tur...@auckland.

Re: [R] Message produced under R 3.6.0.

2019-04-29 Thread Rolf Turner
On 30/04/19 12:19 PM, Jeff Newmiller wrote: Since you now have this indirect dependency, you should make sure you have updated this gaggle of packages. I have found that the dependencies do not necessarily update when I update the package that relies on them. It can take a few passes of readi

<    4   5   6   7   8   9   10   11   12   13   >