Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Rolf Turner
On Tue, 7 May 2024 06:34:50 -0400 Duncan Murdoch wrote: > On 07/05/2024 6:31 a.m., Iago Giné Vázquez wrote: > > Thanks Duncan. > > > > I am currently on Windows. Is there any solution for it? > > Switch to Linux or MacOS? Fortune nomination! cheers, Rolf Tu

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-22 Thread Rolf Turner
See fortunes::fortune(36). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __ R-help@r-project.org

Re: [R] Interactions in regression

2024-02-26 Thread Rolf Turner
<- lm(response~time*treatment,data=xmpldata) yhat <- fitted(mod) xtb <- with(xmpldata,xtabs(yhat ~ time+treatment)) print(xtb) > treatment > time Control Treatment > Post 94.10501 201.99112 > Pre 101.63792 210.04248 Is that (something li

Re: [R] Help

2024-02-20 Thread Rolf Turner
d love to share my script so you guide me where I did wrong . (1) This post is far too vague to be appropriate for this list. (2) You should learn some statistics; probably linear modelling. (3) You should talk to your thesis advisor. (4) Please see fortunes::fortune(285). cheers, Rolf Tur

Re: [R] Help

2024-02-04 Thread Rolf Turner
Please see fortunes::fortune(285). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __ R-help@r

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Rolf Turner
On Sat, 13 Jan 2024 16:54:01 -0800 Bert Gunter wrote: > Well, this would seem to work: > > e <- data.frame(Score = Score > , Country = factor(Country) > , Time = Time) > > ncountry <- nlevels(e$Country) > func= function(dat,idx) { >

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-13 Thread Rolf Turner
On Sat, 13 Jan 2024 17:59:16 -0500 Duncan Murdoch wrote: > My guess is that one of the bootstrap samples had a different > selection of countries, so factor(Country) had different levels, and > that would really mess things up. > > You'll need to decide how to handle that: If you are trying

Re: [R] arrow on contour line

2024-01-11 Thread Rolf Turner
ch leaves me about 150 points short!) to be able to cope with its intricate and unintuitive syntax. I believe that what you want to do is triv in base graphics, but I must confess that I have not gone through the details. cheers, Rolf Turner -- Honorary Research Fellow Departmen

[R] New version of the Iso package is now up on CRAN.

2023-10-02 Thread Rolf Turner
e maintainer of UMR has been notified, and a revision of UMR should become available sometime in the near future. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of AucklandZhiwei Zhang Stats. Dep't. (secretaries) phone:

Re: [R] predict function type class vs. prob

2023-09-23 Thread Rolf Turner
to your enquiry so far may be relied upon to give sound advice.) cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619

Re: [R] Print hypothesis warning- Car package

2023-09-16 Thread Rolf Turner
Sq Mean Sq F value Pr(>F) > Treatment 3 200046668 9.553 0.000246 *** > Expression1 24902490 3.568 0.071050 . > Treatment:Expression 3 2386 795 1.140 0.353142 > Residuals24 16751 698

Re: [R] Query on finding root

2023-08-27 Thread Rolf Turner
n be very revealing, and are easy to effect in R. Relevant method: plot.function(); relevant utility: abline(). Look at the help for these. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 8

Re: [R] MASS::mvrnorm() on MKL may produce different numbers even when the seed is the same?

2023-08-18 Thread Rolf Turner
On Fri, 18 Aug 2023 12:17:51 +0200 Martin Maechler wrote: > I think it would be nice to provide the average R user with a > (possibly super small) R package that allows to turn on (and off) > such CNR reproducibility. Would it be possible to effect this on/off via options()? cheers,

Re: [R] Create a variable lenght string that can be used in a dimnames statement

2023-07-03 Thread Rolf Turner
On Mon, 3 Jul 2023 13:40:41 -0700 Bert Gunter wrote: > I am not going to try to sort out your confusion, as others have > already tried and failed. Fortune nomination!!! cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats.

Re: [R] depmixs4 standardError() issue

2023-06-24 Thread Rolf Turner
hmm"). The source package and a Windoze binary are available. I have not yet submitted my package to CRAN, although I hope to do so in the fairly (???) near future. My package may well have a fair few bugs lurking in its innards. (But then, don't they all?) If you do experiment with eglhmm, please

[R] Testing.

2023-06-19 Thread Rolf Turner
I have just changed my email address with the R-help mailing lists, and I want to check that things are working. Sorry for the noise. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599

Re: [R] extract parts of a list before symbol

2023-05-25 Thread Rolf Turner
be successful only at grabbing > the stuff after the equal sign. > > Pointers to the obvious fix? Thanks... Perhaps names(test) ??? cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries)

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

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

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 __ R-hel

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

[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, Rolf

Re: [R] Select dataframe row containing a digit

2022-11-30 Thread Rolf Turner
at 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 Auc

[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] 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 > > >

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

2022-10-05 Thread Rolf Turner
> 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 > plot with NO horizontal line at W

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-called-y

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] nlme gls issue

2022-09-16 Thread Rolf Turner
though 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 Department of St

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] 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

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

2022-07-23 Thread Rolf Turner
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 Department of

[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't w

[R] Stack smashing again.

2022-04-10 Thread Rolf Turner
tran. 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 assistance. cheers

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

2022-01-28 Thread Rolf Turner
. 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.pdf cheers

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] 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

[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] the opposite of pluck() in purrr

2021-11-18 Thread Rolf Turner
, 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 strokes, even. Tell

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

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

2021-11-07 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

[R] Environmental oddity.

2021-11-06 Thread Rolf Turner
(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 _

[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

Re: [R] Need help in R

2021-10-26 Thread Rolf Turner
uestion 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] 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 li

[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

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

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.

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, >

[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-7599

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 >

[R] NA values for "col"

2021-09-27 Thread Rolf Turner
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 Department of Statist

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

2021-09-19 Thread Rolf Turner
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 function for the F distribution). No harm is done in the current context, but such nomenclature can at times lead to errors &quo

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

2021-09-14 Thread Rolf Turner
ric. 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(as.numeric(X[,"HVA&q

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] 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" argument

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

2021-08-31 Thread Rolf Turner
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, Rolf Turner -- Honorary Resear

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

2021-08-28 Thread Rolf Turner
ide 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 UNSUBSCR

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

2021-08-28 Thread Rolf Turner
eful* 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. cheers, Rolf

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] A glitch (???) in tools::texi2pf.

2021-08-27 Thread Rolf Turner
x.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 Department of

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

2021-08-24 Thread Rolf Turner
!!! 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 mailing list -- To U

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

2021-08-09 Thread Rolf Turner
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 Statistics University o

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

2021-08-07 Thread Rolf Turner
atest 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 to mor

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

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

2021-08-02 Thread Rolf Turner
the 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

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-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

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

2021-07-18 Thread Rolf Turner
is 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(list(Ndat

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

Re: [R] Plotting the ASCII character set.

2021-07-07 Thread Rolf Turner
;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-07 Thread Rolf Turner
ot;; 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

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 i

[R] Plotting the ASCII character set.

2021-07-02 Thread Rolf Turner
oding 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 "\xb0"?

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
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 would guess that there is a bug in the package; it appar

Re: [R] with replace na with 0?

2021-06-11 Thread Rolf Turner
inted 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 University of Auckland Phone: +64-9-373

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] 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

Re: [R] Create a function problem

2021-05-14 Thread Rolf Turner
_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_subset() to

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 >

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

2021-04-30 Thread Rolf Turner
e effect 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] 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

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

2021-03-27 Thread Rolf Turner
ustrating 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-project.org mai

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] 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

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

2021-03-24 Thread Rolf Turner
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 __ R-help@r-project.org mailing

Re: [R] [External] Dimensioning lists.

2021-02-15 Thread Rolf Turner
nes::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 more, see

[R] Dimensioning lists.

2021-02-14 Thread Rolf Turner
get just 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] 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 -- Honorary Res

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 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? chee

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

2021-02-08 Thread Rolf Turner
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 that flak

Re: [R] arima/fixed

2021-01-29 Thread Rolf Turner
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-help@r-project.or

[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 Research Fellow

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

Re: [R] nls() syntax

2020-12-11 Thread Rolf Turner
i, 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 be

[R] nls() syntax

2020-12-11 Thread Rolf Turner
oing, 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 Statistics Univers

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] Subscript and superscript on one symbol; plotmath.

2020-12-09 Thread Rolf Turner
(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 just give

[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 list -

  1   2   3   4   5   6   7   8   9   10   >