Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread Martin Maechler
>>>>> peter dalgaard >>>>> on Mon, 13 Apr 2020 12:00:38 +0200 writes: > Inline... >> On 13 Apr 2020, at 11:15 , Martin Maechler wrote: >> >>>>>>> Bert Gunter >>>>>>> on Sun, 12 Apr

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread Martin Maechler
#x27;, 'stop' is called, producing an error message indicating > the _first_ expression which was not ('all') true. If useR's expectations alone would guide the behavior of a computer language, the language would have to behave "personalized" and give diffe

Re: [R] Having trouble understanding the sapply/vapply documentation and behaviour of USE.NAMES

2020-04-11 Thread Martin Maechler
> Rolf Turner > on Fri, 10 Apr 2020 12:23:49 +1200 writes: > On 10/04/20 10:59 am, petr smirnov wrote: >> I am having trouble parsing the documentation for sapply >> and vapply, and I cannot understand if it explains the >> different behaviour of USE.NAMES between the

Re: [R] Same results but different functions ?

2020-03-23 Thread Martin Maechler
back then, end of the 80's, beginning 90's. Martin > On 23/03/2020 12:39, varin sacha via R-help wrote: >> Dear R-experts, >> >> The rlm command in the MASS package command implements several versions of robust regression, for example the Huber and the

Re: [R] Unintended behaviour (possibly bugs)

2020-03-12 Thread Martin Maechler
, bg = "skyblue", main = "Death Rates in Virginia - 1940", xlab = "rate [ % ]", ylab = "Grouping: Age x Urbanity . Gender") par(op) Thank you, Alexey, for your report and bug fix suggestion! Best regards, Martin Maechler ETH Zurich and R

Re: [R] extremely long installation of devtools

2020-03-09 Thread Martin Møller Skarbiniks Pedersen
On Mon, 9 Mar 2020 at 09:57, Christopher C. Lanz via R-help wrote: > Help! I followed the instructions I found to install ggbiplot, and entered > "install_packages("devtools")" about 25 minutes ago, and the installation > procedure is continuing as I write this. Hi, This is a lot of guess-w

Re: [R] Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

2020-02-07 Thread Martin Morgan
Probably have more success asking on https://support.bioconductor.org. Martin Morgan On 2/7/20, 12:57 PM, "R-help on behalf of pooja sinha" wrote: Hi All, I have a file list consisting of Chromosome, Start , End & Methylation Difference in the following f

Re: [R] Executing an R script and show the plots.

2020-01-29 Thread Martin Møller Skarbiniks Pedersen
rt from either using RStudio > or the REPL exclusively) Add Sys.sleep(Inf) to the end of your script.r and run it with R --interactive < script.r It works for me. Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] [FORGED] Re: Executing an R script and show the plots.

2020-01-29 Thread Martin Møller Skarbiniks Pedersen
s without problems. Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, mini

Re: [R] How to store something not simple in a vector?

2020-01-26 Thread Martin Møller Skarbiniks Pedersen
> I am trying to create a vector to store objects create with gmp::as.bigq(). [...] > library(gmp) > V <- vector(typeof(as.bigq(1)), 100) # typeof(as.bigq(1)) is raw > V[[100]] <- as.bigq(1,2) I got a solution now. If I use a list instead then everything works. Regards Mar

[R] How to store something not simple in a vector?

2020-01-26 Thread Martin Møller Skarbiniks Pedersen
nts supplied than there are to replace And now I understand that bigq is stored as raw-bytes and it is has a length more than 1. Actually: length(as.raw(as.bitq(1,2)) [1] 16 Please advise. Thanks a lot. /Martin M. S. Pedersen __ R-help@r-pro

Re: [R] Strange behaviour of R?

2020-01-17 Thread Martin Maechler
> Sigbert Klinke > on Fri, 17 Jan 2020 09:21:59 +0100 writes: > Hi, > Am 17.01.20 um 08:42 schrieb Rainer M Krug: >> Not for me - macOS, R 3.6.2 > Sorry, I forgot to add: Ubuntu 18.04.3 LTS, R 3.6.2 Sorry but that's very hard to believe, i.e., that such fundamental R

Re: [R] date

2019-12-19 Thread Martin Maechler
> John Kane > on Tue, 17 Dec 2019 20:28:17 -0500 writes: > library(lubridate) > gs$dat1 <- mdy(gs$date) there's really no reason for going beyond base R. Using the proper format as per Patrick and Peter's advice (below) is perfectly clear and actually more robust (for the

Re: [R] Help to write the R-code, please

2019-12-06 Thread Martin Maechler
f it is right, > it pays to START by writing a crude obvious brute force > algorithm like this so that you can test your test cases. Definitely! First be *right*, only then think of being fast .. Martin > On Fri, 6 Dec 2019 at 03:14, Александр Дубровский > wr

Re: [R] how to find number of unique rows for combination of r columns

2019-11-08 Thread Martin Morgan
3 x 4 # Groups: a [2] a b v1_mean v2_median 1 1 1 1.5 3.5 2 2 2 3 2 3 2 3 4 1 I do not know how performant this would be with data of your size. Martin Morgan On 11/8/19, 1:39 PM, "R-help on behalf of Ana Marija

Re: [R] Global curve fitting/shared parameters with nls() alternatives

2019-11-08 Thread Martin Maechler
ages and hence is part of every (non-handicapped) R installation. Best, Martin Maechler ETH Zurich and R Core Team > On Tue, 5 Nov 2019 at 20:28, Bert Gunter > wrote: >> A simplified example of what you wish to do might help to >> clarify here. >>

[R] Conversion from python to R - log-problem

2019-10-27 Thread Martin Møller Skarbiniks Pedersen
(x) [1] 0.8207096 = range(3,7) (Python) is the same as 3:6 (R) log() (Python) is the same as log10 (R) What can be wrong? Regards Martin M. S. Pedersen ps. I hope this is plain text without any HTML. [[alternative HTML version deleted]] __ R-

[R] "chi-square" | "chi-squared" | "chi squared" | "chi square" ?

2019-10-18 Thread Martin Maechler
squared"; but as I mentioned, I still find all 4 variants even in "R base" package help files (which of course I now could quite quickly change (using Emacs M-x grep, plus a script); but ... "as it is Friday" ... I'm interested to hear what others think, notably if

Re: [R] stats::power.t.test error

2019-10-15 Thread Martin Maechler
5 power = 0.9 alternative = two.sided NOTE: n is number in *each* group As the change is small, and I see that Witold has good reasons to prefer this to wrapping everything in try(.) or (better) tryCatch(.), I propose to commit the change after a bit more testing. Martin

Re: [R] how to use a matrix as an index to another matrix?

2019-10-11 Thread Martin Morgan
A matrix can be subset by another 2-column matrix, where the first column is the row index and the second column the column index. So idx = matrix(c(B, col(B)), ncol = 2) A[] <- A[idx] Martin Morgan On 10/11/19, 6:31 AM, "R-help on behalf of Eric Berger" wrote: Here is

Re: [R] BiocManager problem.

2019-10-10 Thread Martin Morgan
Please follow the response to your question on the Bioconductor support site https://support.bioconductor.org/p/125493/ Martin Morgan On 10/10/19, 12:23 PM, "R-help on behalf of Ali Siavosh" wrote: Hi, I have installation of R in a server running on redhat 7. I have upgra

Re: [R] The "--slave" option ==> will become "--no-echo"

2019-09-27 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 23 Sep 2019 16:14:36 +0200 writes: >>>>> Richard O'Keefe >>>>> on Sat, 21 Sep 2019 09:39:18 +1200 writes: >> Ah, *now* we're getting somewhere. There is something

Re: [R] static vs. lexical scope

2019-09-26 Thread Martin Møller Skarbiniks Pedersen
. So if they know Java, C, C# etc. then the scoping rules for R are the same. I finally says that it is not a full answer but enough for most. Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailm

Re: [R] The "--slave" option

2019-09-23 Thread Martin Maechler
in the future ?) So, all those who want to restrict their language could use '-s' for now. In addition, we could add >> one << other alias to --slave, say --subprocess (or --quieter ? or ???) and one could make that the preferred use some time in the future. Well, th

[R] R wrong, Python rigth in calcution

2019-09-17 Thread Martin Møller Skarbiniks Pedersen
Hi, I don't understand why R computes this wrong. I know I can use gmp and R will do it correctly. $ echo '569936821221962380720^3 + (-569936821113563493509)^3 + (-472715493453327032)^3' | Rscript - [1] -4.373553e+46 Correct answer is 3 and Python can do it: $ echo 'pow(569936821221962380720,3)

Re: [R] Moving 2nd column into 1st column using R

2019-09-11 Thread Martin Møller Skarbiniks Pedersen
X1 X2 1 4 2 5 3 6 > I want move my 2nd column become like this: > X11 234 5 6 > Hope anyone can help me. Many thanks. I am not sure I understand your problem, but try: mydf <- data.frame(matrix(1:6, ncol = 2, byrow = TRUE)) Regards Martin

Re: [R] R_BATCH_OPTIONS not respected?

2019-09-10 Thread Martin Maechler
h mode? > (This is on macOS 10.14.6 with R version 3.6.1) Maybe macOS is the problem? It works fine on Linux: export R_BATCH_OPTIONS='--no-save --no-restore' R CMD BATCH .R produces .Rout and nothing else for me Martin > Thanks & cheers, > M >

Re: [R] Reading large files with R

2019-09-01 Thread Martin Møller Skarbiniks Pedersen
On Sun, 1 Sep 2019 at 21:53, Duncan Murdoch wrote: > On 01/09/2019 3:06 p.m., Martin Møller Skarbiniks Pedersen wrote: > > Hi, > > > >I am trying to read yaml-file which is not so large (7 GB) and I have > > plenty of memory. > > > Individual elements in

[R] Reading large files with R

2019-09-01 Thread Martin Møller Skarbiniks Pedersen
nu (64-bit) library(yaml) keys <- read_yaml("/data/gpg/gpg-keys.yaml") Error in paste(readLines(file), collapse = "\n") : result would exceed 2^31-1 bytes 2^31-1 is only 2GB. Please advise, Regards Martin [[alternative HTML version deleted]] __

Re: [R] Cannot load vegan and vcd, "object vI not found"

2019-08-20 Thread Martin Maechler
recursively, when importing from other packages]. I think the error message is not really useful, and indeed I think should *not* happen at this time: 'vI' is not defined here, because earlier the 'pkgInfo' result was not really valid. So I think you may have touched on a &quo

[R] GMP help - converting rosetta RSA-code to R

2019-08-17 Thread Martin Møller Skarbiniks Pedersen
(plaintext), 1, 1, 0, 0, plaintext); I have tried: library(gmp) plaintext <- "Rossetta Code" as.bigz(charToRaw(plaintext)) and library(gmp) plaintext <- "Rossetta Code as.big(split(plaintext,"")) Thanks for any help/suggestions Regards Martin M. S. Pedersen

[R] gmp coredump - where to report?

2019-08-16 Thread Martin Møller Skarbiniks Pedersen
an issue? Regards Martin Here is the code that generate the core-dump: $ head -3 ~/R/x86_64-pc-linux-gnu-library/3.6/gmp/DESCRIPTION Package: gmp Version: 0.5-13.5 Date: 2019-02-21 $ R --version | head -3 R version 3.6.1 (2019-07-05) -- "Action of the Toes" Copyright (C) 2019 The R

Re: [R] R 3.6.1

2019-07-18 Thread Martin Maechler
no one knows about this problem. The last sentence suggests, you did have 3.6.0 installed and you are sure to not have seen such problems ?? In that case even more, we (R core, notably) would be interested to see a minimal repr.ex triggering the problem. (and what is '00UNLOCK' ?)

Re: [R] Trying to coerce an AnnotatedDataFrame in order to access Probeset Info

2019-07-17 Thread Martin Morgan
nnotatedDataFrame': none Biobase is a Bioconductor package, so support questions should more appropriately go to https://support.bioconductor.org Martin On 7/17/19, 4:20 PM, "R-help on behalf of Spencer Brackett" wrote: Good evening, I downloaded the Biobase packag

Re: [R] hist{graphics}

2019-07-15 Thread Martin Maechler
er-like" or categorical. We (the R user community, notably the graphically oriented subset) should really strive to keep these concepts and the corresponding visualizations separate as well as possible [and educate the consumers of our graphics if necessary ..] Martin Maechler ETH Zurich an

Re: [R] Add transitivity to a matrix?

2019-06-18 Thread Martin Maechler
ith >> multiplication would be a more efficient way to obtain this answer than >> repeated use of a power operator. Of course! .. I was not suggesting it for this case where all powers are needed ! >> On June 18, 2019 8:01:09 AM CDT, Martin Maechler

Re: [R] Add transitivity to a matrix?

2019-06-18 Thread Martin Maechler
> peter dalgaard > on Tue, 18 Jun 2019 11:45:39 +0200 writes: > Sounds like this is isomorphic to reachability in graph > theory. I wonder if > (sum_1^n M^i) > 0 > would suffice? neat! (and I guess correct) > -pd Which reminds me that in the relatively dista

[R] R-help mailing list archives

2019-06-11 Thread Martin Maechler
22 page from GMANE. Yes, unfortunately... Should probably remove that link from the R-help info page; it has gone for several years now AFAIK. Martin Maechler ETH Zurich and R Core Team > Nabble returned 2 hits for variations on the search terms > "rgui high dpi 4k"    

Re: [R] Pasting R code lines into labels

2019-06-07 Thread Martin Maechler
are likely additional tweaks that could be made, as Nick may require. > Regards, > Marc ... tweaks which may already be available in curve() / plot.function(). At the time, I had invested many many man hours to tweak them to become as versatile as seemed feasible ... Martin Ma

Re: [R] debug only top level function

2019-06-06 Thread Martin Maechler
;blurred" for byte compiled functions, and as the default JIT level is high, I had occasionallz wanted an easy way to revert the byte compilation before debugging or another way to get rid of this drawback.. Martin >> >> Best regards >> Petr >>

Re: [R] Mysterious NOTE when checking package

2019-06-03 Thread Christian Martin Hennig
Dear Marc, > Two things: > > 1. This should be posted to R-package-devel, which is focused on R/CRAN > package development: > >https://stat.ethz.ch/mailman/listinfo/r-package-devel > > > 2. What are the exact commands that you used to build and then check the > package? > > "R CMD build" sho

[R] Mysterious NOTE when checking package

2019-06-03 Thread Christian Martin Hennig
Dear list members, checking my updated version of prabclus with R-devel --as-cran I get a mysterious note: "* checking DESCRIPTION meta-information ... NOTE Checking should be performed on sources prepared by ‘R CMD build’." (No further information is given on that one in 00check.log.) But my

Re: [R] error in duplicated() man page

2019-05-09 Thread Martin Maechler
> Bert Gunter > on Thu, 9 May 2019 08:46:15 -0700 writes: > Juan: > No, I think there may be a bug: >> duplicated(array(c(1,2,3,2,5,6),c(3,2)), MARGIN=1:2) > [,1] [,2] > [1,] FALSE TRUE > [2,] FALSE FALSE > [3,] FALSE FALSE > ## This is wrong >

Re: [R] approx with NAs

2019-05-08 Thread Martin Maechler
Dear Robert, this is really not asking for help about R but rather wishing for new features of a (very long) existing R function. Hence this is a topic for the 'R-devel' mailing list (https://stat.ethz.ch/mailman/listinfo/R-devel ) rather than 'R-help'; see also https://www.r-project.org/mail.h

Re: [R] Can't rsync extsoft/3.6 when compiling R 3.6

2019-05-02 Thread Martin Maechler
able browser (such as Emacs), you see Dec 22 2014 3.2 Jun 16 2016 3.3 Jul 6 2016 3.4 -> 3.3 May 8 2017 3.5 -> 3.3 So it seems the CRAN team (or the R Core release master?) forgot to make that symbolic link there. As workaround get the 3.5 version and "call it"

Re: [R] Bug in R 3.6.0?

2019-04-30 Thread Martin Maechler
ms all R core (and other R expert users who have tried R 3.6.0 alpha, beta, and RC versions) have *not* seen the bug as they are intuitively smart not to mess with R's working directory in a global R profile file ... For now you definitively have to work around by not doing what's the p

Re: [R] Message produced under R 3.6.0.

2019-04-30 Thread Martin Maechler
an Murdoch After all, I think the new messages have shown their worth here: They were only "uttered" because of bugs (.. and maybe the bugs have only be fixed so quickly because of these messages appearing?) I don't think you (or others) should suppress such messages by default. T

Re: [R] Limiting the scope of RNGkind/set.seed

2019-04-16 Thread Martin Maechler
": suppressWarnings(RNGversion("3.5.0")) set.seed(seed) ## return random permutation of "my colors" sample(colors()[-c(152:361)]) } BTW, you can look at simulate() methods in standard R, e.g., stats:::simulate.lm to see the same method use [optionally,

Re: [R] problem with nls....

2019-03-22 Thread Martin Maechler
it's help page, I'm not the author of that function and its submethods: https://www.rdocumentation.org/packages/robustbase/versions/0.93-4/topics/nlrob Martin Maechler ETH Zurich > -- > Best regards, > Ivan > _

Re: [R] [FORGED] Re: Issue with t.test

2019-03-21 Thread Martin Maechler
occasionally will be correct, Rolf ... but only if you move **much** much closer and in this case, it even seems not to happen at all: > mx <- mean(x) > mx - mx*(1 + 2^(-53+7e-15)) [1] -1.110223e-16 > 1 - t.test(x,mu=mx*(1 + 2^(-53+7e-15)))$p.value [1] 1.110223e-15

Re: [R] Which dependency list to build first?

2019-02-26 Thread Martin Maechler
7;d re-install first Rcpp, then BH, and then "your" package. Please let us (= the audience) know if that helped. Best, Martin > Learning which package(s) need to be rebuilt here for 'later' will help me > the next time I encounter this situaion. > TIA,

Re: [R] Remove cases with -Inf from a data frame

2019-02-16 Thread Martin Møller Skarbiniks Pedersen
function(x) which(x == -Inf,] Regards Martin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project

Re: [R] Unexpected errors in sparse Matrix arithmetic with zero-length dimensions

2019-02-15 Thread Martin Maechler
parse Matrix arithmetic causes my unit > tests to fail for no (obvious) good reason. Interesting that you need 0-dim sparse matrices. I agree they should work, too... and will fix (but it seems they haven't been used much by others; else I would have expected these cases to have been re

[R] How to fit the following data and get the equation describing them?

2019-02-12 Thread Martin Beseda
e 'e' and 's' are the coefficients to be fitted. I have no idea, if it's possible to specify the exact position of fitted coefficients, i.e. inside the fraction like here. Could you, please, advise me, how to do any of these things? Thank

Re: [R] Spacing around \cdot (%.%) unequal in pdf

2019-02-08 Thread Martin Maechler
) ## e.g., eaxis(2, at = ypos, labels = pretty10exp(ypos, drop.1=TRUE)) gives a nice plot for me, not using 'cdot' but rather > pretty10exp(ypos, drop.1=TRUE) expression(10^6, 2 %*% 10^6, 3 %*% 10^6) > > Thanks for any hint > Pascal You are welcome! Mart

Re: [R] load.wave q

2019-02-01 Thread Martin Maechler
d, reproducible code. In both of the above URLs it is mentioned that R-help is archived (in many places): Questions and their answers are there for the R community (of the future) who will find and be able to learn from them. Best, Martin Maechler ETH Zurich and R Core team _

Re: [R] Newbie Question on R versus Matlab/Octave versus C

2019-01-30 Thread Martin Møller Skarbiniks Pedersen
etting started in R" from http://ilustat.com/shared/Getting-Started-in-R.pdf And then try running the code used in the examples. Regards Martin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSC

[R] R package installation error

2019-01-28 Thread Christian Martin Hennig
Hi there, I'm running R version 3.5.2 on Linux Mint. I try install.packages("hierfstat") and get this: ** byte-compile and prepare package for lazy loading Error in rbind(info, getNamespaceInfo(env, "S3methods")) : number of columns of matrices must match (see arg 2) ERROR: lazy loading faile

Re: [R] Was there a change to R ver. 3.5.2 so that it now treats warnings during installs as errors?

2019-01-20 Thread Martin Morgan
installing the package would address this problem. Martin Morgan On 1/20/19, 6:58 AM, "R-help on behalf of Duncan Murdoch" wrote: On 19/01/2019 8:22 p.m., Peter Waltman wrote: > I'm trying to install a devel package called gGnome ( > https://github.com/mskilab

Re: [R] I can't get seq to behave how I think it should

2019-01-18 Thread Martin Maechler
tation. Your example here works because the rounding typically happens to end up with the same binary repr ... this all relies on too many details to be recommendable. Martin Maechler ETH Zurich and R Core team >> -Original Message- >> From: R-help On Behalf Of Ben

Re: [R] Diff'ing 2 strings

2019-01-10 Thread Martin Møller Skarbiniks Pedersen
On Thu, 10 Jan 2019 at 09:23, Gerrit Eichner < gerrit.eich...@math.uni-giessen.de> wrote: > Don't you mean ?Rdiff ? > > Oh yes. The unix/linux command diff uses the rdiff-algorithme and it seems that Rdiff in R uses the exactly same algorithme. Regards Martin [[alte

Re: [R] Diff'ing 2 strings

2019-01-09 Thread Martin Møller Skarbiniks Pedersen
On Sat, Jan 5, 2019, 14:58 Sebastien Bihorel < sebastien.biho...@cognigencorp.com wrote: > Hi, > > Does R include an equivalent of the linux diff command? > yes. ?rdiff /martin [[alternative HTML version deleted]] __ R-hel

Re: [R] Issues with R3.5.2

2018-12-23 Thread Martin Maechler
ume we would would have heard of it if this was a common problem.. (But then I may be wrong if the Windows users are "slow" to update their R version) Martin Merry Christmas! > On December 22, 2018 8:16:11 PM PST, Janh Anni > wrote: >> This issue only came up

Re: [R] Webshot failed to take snapshot in Ubuntu machine

2018-12-20 Thread Martin Maechler
., the one that webshot() will then try to use and somehow fails. I'd recommend you run webshot::install_phantomjs() which then should install a "better" version of the 'phantomjs' executable that then *should* work .. Let us know if this helped (or why not). Best, Martin M

Re: [R] R plot split screen in uneven panels

2018-12-13 Thread Martin Maechler
ype="cairo")], where all these are identical on the left and the right plot. Such behavior seems like a bogous graphics device or bogous interaction with underlying libraries or ?? > I do not know why and am too lazy to delve into the code. > Bert Gunter Can you at least tell

Re: [R] which() function help page precision

2018-11-16 Thread Martin Maechler
add "(except > for NA handling)" or so. > -pd or --- applying Swiss diplomacy finding a way-between ;-) --- " Basically, the result is (1:length(x))[x], or to cover more cases, including when x has NA's, seq_along(x)[!is.na(x) & x] " to also cover

[R] very slow "memoise"

2018-11-15 Thread Martin Møller Skarbiniks Pedersen
tstep <- memoise(nextstep) for (idx in 1:1e4) { steps <- 0 current <- idx while (current != 1) { steps <- steps + 1 current <- nextstep(current) } cat(idx,steps,"\n") } Regards Martin __ R-help@r-p

Re: [R] which element is duplicated?

2018-11-13 Thread Martin Maechler
t; as.numeric(vf) > [1] 2 2 1 2 1 1 > > Cheers > Petr Yes, as was already remarked by Michael Sumner. But really the power is in match() : It is called at *twice* by factor(). Martin > > -Original Message- > > From: R-help On Behalf Of Bert Gunter > >

Re: [R] saveRDS() and readRDS() Why? [solved, kind of]

2018-11-08 Thread Martin Maechler
;t know Why, but I know How. Hmm.. and nobody has been able to reproduce your problem, right? IIUC, currently you are suggesting that [on Windows], if you do saveRDS(rawdata, file="rawdata.rds") the resulting file is does not work withreadRDS()

Re: [R] R command prompt newline treatment

2018-11-06 Thread Martin Maechler
> Jeff Newmiller > on Mon, 5 Nov 2018 18:47:00 -0800 writes: > Well, you may or may not have ruled out the Putty settings > (your hand waving is a bit hard for me to interpret), and > there may still be host side terminal settings involved, > or if you compiled R yours

Re: [R] OT: R version 1.0.1 is still a success.

2018-11-01 Thread Martin Maechler
ally saddened to notice that even relatively smart people (such as our students) think and talk about using Rstudio when they use R via Rstudio... Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/lis

Re: [R] Project in emacs + ess

2018-10-18 Thread Martin Maechler
ow, and issues are tracked here: https://github.com/emacs-ess/ESS/issues/ Last but not least : Welcome to the world of Emacs and ESS ! -- Martin Maechler ETH Zurich (and ESS core team) > Cheers, Bert > Bert Gunter > "The trouble with having an open mind is that

Re: [R] For Loop

2018-09-25 Thread Martin Maechler
I am > talking about. > I just provided tentative solution for the person asking > for it and believe he has enough wisdom to decide what's > best. why bother to judge others subjectively? Well, because Ista Zahn is much much much better R programmer than you,

Re: [R] Link from vignette to package documentation

2018-09-22 Thread Martin Maechler
package (*.Rmd or *.Rnw) vignettes to help pages of the same package is also not easily and portably possible AFAICS. Both would be desirable quite desirable for improved R documentation and ideally so in a way that could also work with an internet connection. [and if we continue this,

Re: [R] Smallest Space Analysis (SSA) in R

2018-09-20 Thread Martin Maechler
> Eric Berger > on Thu, 20 Sep 2018 23:28:27 +0300 writes: > Hi Andrew, > I don't have any experience in this area but I was intrigued by your > question. Here is what I learned. > 1, A bit of poking around turned up a thread on stats.stackexchange that > mentions

Re: [R] Efficient way of loading files in R

2018-09-07 Thread Martin Morgan
Ask on the Bioconductor support site https://support.bioconductor.org Provide (on the support site) the output of the R commands library(GEOquery) sessionInfo() Also include (copy and paste) the output of the command that fails. I have > gseEset2 <- getGEO('GSE76896')[[1]] Found 1 file(s)

Re: [R] Account for a factor variability in a logistic GLMM in lme4

2018-09-04 Thread Martin Maechler
used by that mistake: Only considering the '1's and not considering the '0's in the data (visualised and shown to the decision making experts). See, e.g., https://priceonomics.com/the-space-shuttle-challenger-explosion-and-the-o/ (couldn't easily find a more academic

Re: [R] Prevent Printing Function's Environment

2018-08-14 Thread Martin Maechler
> Abs Spurdle > on Tue, 14 Aug 2018 15:16:08 +1200 writes: > Hi All > When you print a function constructed within a function, R > prints it's environment. For example: > > myfunction = function () > + { f = function () NULL > + attributes (f) = lis

Re: [R] Fwd: Help with finalfit and knitr

2018-08-08 Thread Martin Maechler
of code > and marveling at the result is exhilarating but ultimately > leaves you handicapped in creating your own code." > Fortune nomination! seconded! Martin > Cheers, Bert > Bert Gunter __ R-help@

Re: [R] loop over matrix: subscript out of bounds

2018-08-08 Thread Martin Maechler
> Eric Bergeron Wed, 8 Aug 2018 12:53:32 +0300 writes: > You only need one "for loop" > for(i in 2:nrow(myMatrix)) { >myMatrix[i-1,i-1] = -1 >myMatrix[i-1,i] = 1 > } > > HTH, > Eric and why are you not using Enrico Schumann's even nicer solution (from August 6) that I had mention

Re: [R] loop over matrix: subscript out of bounds

2018-08-07 Thread Martin Maechler
: Without any loop, a very nice R-ish way (see his message)! Martin > Best, > Maija __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-p

Re: [R] Plot Rect Transparency

2018-07-27 Thread Martin Maechler
> Duncan Murdoch > on Thu, 28 Jun 2018 20:57:19 -0400 writes: > On 28/06/2018 5:29 PM, Jeff Reichman wrote: >> R-Help >> >> >> >> Is there a way to make a rectangle transparent (alpha=0.1??) >> >> >> >> plot(c(100, 200), c(300, 450), type=

Re: [R] SQL Database

2018-07-26 Thread Martin Maechler
tim() if this was optimal << more optimal << most optimal :-) ;-) Best, Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Do there need to be the same number of y-values for each x-value when using tapply?

2018-07-08 Thread Martin Maechler
The answer to your Q is surely a "no": That's exaxtly the point of tapply that the number of y values may vary. The msg tells you that the x & y full vectors must have the same length. Hoping that helps. Martin [[alternative H

[R] prod(NaN, NA) vs. prod(NA, NaN)

2018-07-03 Thread Martin Møller Skarbiniks Pedersen
turned, otherwise ‘NA’ and ‘NaN’ values are ignored. Maybe the manual for prod() should say the same as sum() that both NA and NaN can be returned? Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

[R] Regexp bug or misunderstanding

2018-07-02 Thread Martin Møller Skarbiniks Pedersen
ase 2: grep("[:digit:]", "**ABAAbabaabackabaloneaband") [1] 1 Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pr

Re: [R] mzR fails to install/compile (linuxes)

2018-06-16 Thread Martin Morgan
sue on the maintainer's github https://github.com/sneumann/mzR/issues/ this is linked to from the package 'landing page' https://bioconductor.org/packages/mzR Martin Morgan On 06/15/2018 10:49 AM, lejeczek via R-help wrote: hi guys, just an admin here. I wonder if anybody see what

Re: [R] verInd= and HorInd= arguments to pairs() function

2018-06-08 Thread Martin Maechler
>>>>> Gerrit Eichner >>>>> on Fri, 8 Jun 2018 12:55:31 +0200 writes: > Am 08.06.2018 um 12:02 schrieb Martin Maechler: >>>>>>> Martin Maechler >>>>>>> on Fri, 8 Jun 2018 11:13:24 +0200 writes: >

Re: [R] verInd= and HorInd= arguments to pairs() function

2018-06-08 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 8 Jun 2018 11:13:24 +0200 writes: [..] >> Thank you, Chris, for the report and >> Gerrit for your proposed fix !! >> >> It looks good to me, but I will test some more (also

Re: [R] verInd= and HorInd= arguments to pairs() function

2018-06-08 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 7 Jun 2018 18:35:48 +0200 writes: >>>>> Gerrit Eichner >>>>> on Thu, 7 Jun 2018 09:03:46 +0200 writes: >> Hi, Chris, had the same problem (and first thought it was >> my

Re: [R] verInd= and HorInd= arguments to pairs() function

2018-06-07 Thread Martin Maechler
label.pos >text.panel(xlp, ylp, labels[i], cex = cex.labels, > font = font.labels) > } > } > else if (i < j) > localLowerPanel(as.vector(x[, j]), as.vector(x[, > i]), ...) &g

Re: [R] Unable to take correct Web-snapshot

2018-06-01 Thread Martin Møller Skarbiniks Pedersen
can use their api to get json instead: https://api.coinbase.com/v2/prices/spot?currency=USD Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] mysterious rounding digits output

2018-05-30 Thread Martin Maechler
> Ted Harding > on Thu, 31 May 2018 07:10:32 +0100 writes: > Well pointed out, Jim! > It is infortunate that the documentation for options(digits=...) > does not mention that these are *significant digits* > and not *decimal places* (which is what Joshua seems to wan

Re: [R] par(mfrow=c(3,4)) problem

2018-05-30 Thread Martin Maechler
s: > https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html > This vignette has a good overview, well as info specific to that package. > Sarah A very nice vignette indeed! Didn't know about these. Thank you, Sarah, and thanks to the author, Baptiste Auguie ! Mart

[R] draw borders of bars inside of the rectangles in a barplot

2018-05-21 Thread Martin Batholdy via R-help
Dear R-users, I want to draw a barplot with beside=TRUE. One halve of the bars are drawn with a border, while the other halve are drawn without a border (i.e. filled bars vs. non-filled bars next to each other). Because borders are drawn around the bars, doing this leads to one halve of the bar

Re: [R] S4 class slot type S4 class

2018-05-21 Thread Martin Morgan
ot;b": An object of class "B" Slot "y": numeric(0) Slot "z": numeric(0) > .C(a = .A(x = 1:2), b = .B(y = 2:1, z = 1:2)) An object of class "C" Slot "a": An object of class "A" Slot "x": [1] 1 2 Slot "b": An

Re: [R] Comparing figures?

2018-05-07 Thread Martin Maechler
e pdf(*, compress=FALSE) actually also setting 'encoding=.' and 'paper=.', see the R sources at https://svn.r-project.org/R/trunk/tests/reg-plot.R and the check (source at https://svn.r-project.org/R/trunk/tests/Makefile.common) basically is using R CMD Rdiff .p

Re: [R] Converting a list to a data frame

2018-05-03 Thread Martin Maechler
Beautiful use of do.call() and lapply(), two of the most versatile and important functions from the base R toolbox. Congratulations! Martin Maechler R Core Team > -Original Message- > From: R-help On Behalf Of David L Carlson > Sent: Wednesday, May 2, 2018 3:51 PM > To:

Re: [R] How would I color points conditional on their value in a plot of a time series

2018-05-02 Thread Martin Maechler
K. Dovik > Bergen, NO yes, indeed, or -- even nicer for a time series: using 'type = "c"' which many people don't know / have forgotten about: ttt <- ts(rpois(12, lambda = 8), start = c(2000, 1), freq = 4) plot (ttt, type = "c") points(ttt, col = ifelse

Re: [R] Error : 'start' contains NA values when fitting frank copula

2018-04-21 Thread Martin Maechler
or the next release of the copula package... but am a bit hesitant to complicate (and slowdown) the current code by adding an extra check for this situation. Martin Maechler ETH Zurich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see ht

<    1   2   3   4   5   6   7   8   9   10   >