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

2021-10-29 Thread Duncan Murdoch
On 29/10/2021 8:19 p.m., Rolf Turner wrote: I cannot get the "inset" argument in legend() to produce the results that I want. It seems to me that when the legend position argument is set to "bottom" then only the second (y-component) entry of "inset" has any effect, and when the position

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

2021-10-29 Thread Rolf Turner
I cannot get the "inset" argument in legend() to produce the results that I want. It seems to me that when the legend position argument is set to "bottom" then only the second (y-component) entry of "inset" has any effect, and when the position argument is "left" then only the first

Re: [R] generate random numeric

2021-10-29 Thread Ken Peng
That's all right. Thanks. On Sat, Oct 30, 2021 at 12:29 AM Marc Schwartz wrote: > Ken Peng wrote on 10/29/21 2:39 AM: > > I saw runif(1) can generate a random num, is this the true random? > > > >> runif(1) > > [1] 0.8945383 > > > > What's the other better method? > > > > Thank you. > > > Hi, >

Re: [R] Probably off topic but I hope amusing

2021-10-29 Thread T. A. Milne via R-help
I think Jeff is right, but there is a minor bit of history that is missing. The Intel 8087 numeric coprocessor, announced in 1980, was (in effect) based on a draft version of what later became the IEEE754-1985 standard, and the 8087 included "NaN" as part of its exception handling routines. 

Re: [R] I'd like to request that my R CRAN package is not tested on Solaris OS

2021-10-29 Thread Kevin Wright
Lampros, You can use Rhub for testing packages on various platforms. I had a similar issue to you...I had a tiny bug that was only failing on M1mac. I was able to resolve it by repeatedly testing my package on Rhub. Here's how I did that: https://github.com/kwstat/nipals/issues/5 Kevin Wright

Re: [R] Probably off topic but I hope amusing

2021-10-29 Thread Jeff Newmiller
AFAIK NaN originated in the floating point standard IEEE754-1985 as a range of bit patterns that have all 1 bits in the exponent, and the convention to convert such bit patterns to the string "NaN" is an obvious way to handle output of such patterns, regardless of language. Pasting a % symbol

Re: [R] Probably off topic but I hope amusing

2021-10-29 Thread Avi Gross via R-help
Bert, R is used all over the place, sometimes not visibly. A search shows the NY times using it in 2011, 2009, ...: https://www.nytimes.com/2009/01/07/technology/business-computing/07program.h tml https://blog.revolutionanalytics.com/2011/03/how-the-new-york-times-uses-r-f

Re: [R] Format utils::bibentry with a 'corporate name'

2021-10-29 Thread Duncan Murdoch
On 29/10/2021 1:21 p.m., Sam Albers wrote: Hi all, Does anyone know of a way to force utils::bibentry to mimic the BibTex behaviour of using double { to force a "corporate name" in the author field to print correctly? For example take this bibentry: Enter it like this: entry <-

Re: [R] Format utils::bibentry with a 'corporate name'

2021-10-29 Thread Erin Hodgess
Maybe use \{ for the second one? On Fri, Oct 29, 2021 at 11:22 AM Sam Albers wrote: > Hi all, > > Does anyone know of a way to force utils::bibentry to mimic the BibTex > behaviour of using double { to force a "corporate name" in the author > field to print correctly? For example take this

[R] Format utils::bibentry with a 'corporate name'

2021-10-29 Thread Sam Albers
Hi all, Does anyone know of a way to force utils::bibentry to mimic the BibTex behaviour of using double { to force a "corporate name" in the author field to print correctly? For example take this bibentry: entry <- utils::bibentry( bibtype = "Manual", title = "The Thing", author = "The

Re: [R] generate random numeric

2021-10-29 Thread Marc Schwartz via R-help
Ken Peng wrote on 10/29/21 2:39 AM: I saw runif(1) can generate a random num, is this the true random? runif(1) [1] 0.8945383 What's the other better method? Thank you. Hi, You do not indicate your use case, and that can be important. The numbers generated by R's default RNGs are

Re: [R] customize the step value

2021-10-29 Thread Avi Gross via R-help
As others have replied, the customary way is to use the seq() function that takes additional arguments besides a from= and a to= such as by= to specify the step size and two others sometimes handy of length.out= and along.with= In your case seq(from=1.5, to=3.5, by=0.5) works as well as the

Re: [R] customize the step value

2021-10-29 Thread Duncan Murdoch
On 29/10/2021 11:04 a.m., Martin Maechler wrote: Duncan Murdoch on Fri, 29 Oct 2021 09:07:31 -0400 writes: > On 29/10/2021 4:34 a.m., PIKAL Petr wrote: >> Hi >> >> One has to be careful when using fractions in seq step. >> >> Although it works for 0.5

[R] Probably off topic but I hope amusing

2021-10-29 Thread Bert Gunter
There was a little discussion today (yet again) about floating point arithmetic. Perhaps related to this, I subscribe to the online NYTimes, which flashes U.S. stock index prices at the top of its home page. Today, instead of the Nasdaq price being flashed, there was this: undefined-NaN% I

Re: [R] customize the step value

2021-10-29 Thread Rui Barradas
Hello, Às 14:07 de 29/10/21, Duncan Murdoch escreveu: On 29/10/2021 4:34 a.m., PIKAL Petr wrote: Hi One has to be careful when using fractions in seq step. Although it works for 0.5 (seq(0,10, .5) - round(seq(0,10,.5),2))==0   [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE

Re: [R] customize the step value

2021-10-29 Thread Martin Maechler
> Duncan Murdoch > on Fri, 29 Oct 2021 09:07:31 -0400 writes: > On 29/10/2021 4:34 a.m., PIKAL Petr wrote: >> Hi >> >> One has to be careful when using fractions in seq step. >> >> Although it works for 0.5 >>> (seq(0,10, .5) - round(seq(0,10,.5),2))==0

Re: [R] generate random numeric

2021-10-29 Thread Jeff Newmiller
It is difficult to do "truly random" number generation with computers, but fortunately number sequences that appear random but progress consistently from an initial seed value (?set.seed) are actually much more useful for analysis purposes than true randomness is. On October 28, 2021 11:39:07

Re: [R] customize the step value

2021-10-29 Thread Duncan Murdoch
On 29/10/2021 4:34 a.m., PIKAL Petr wrote: Hi One has to be careful when using fractions in seq step. Although it works for 0.5 (seq(0,10, .5) - round(seq(0,10,.5),2))==0 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [16] TRUE TRUE TRUE TRUE TRUE TRUE in

Re: [R] customize the step value

2021-10-29 Thread PIKAL Petr
Hi One has to be careful when using fractions in seq step. Although it works for 0.5 > (seq(0,10, .5) - round(seq(0,10,.5),2))==0 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [16] TRUE TRUE TRUE TRUE TRUE TRUE in case of 0.3 (or others) it does not always

Re: [R] customize the step value

2021-10-29 Thread Erich Subscriptions
seq(1.5,3.5,0.5) The docs for seq will show you many more options. > On 29.10.2021, at 09:06, Catherine Walt wrote: > > dear members, > > Sorry I am newbie on R. > as we saw below: > >> 1.5:3.5 > [1] 1.5 2.5 3.5 > > How can I make the step to 0.5? > I want the result: > > 1.5 2.0 2.5 3.0

Re: [R] R vs Numpy

2021-10-29 Thread Catherine Walt
Thanks for Avi. and all other people's helps. I am using Numpy primarily for machine learning, for example, Keras tasks can use Numpy heavily. Now I got a task to analyze the BIO data, for which the Prof tell me R is better. So I am looking into R. and I was just serious if Numpy can handle

[R] customize the step value

2021-10-29 Thread Catherine Walt
dear members, Sorry I am newbie on R. as we saw below: > 1.5:3.5 [1] 1.5 2.5 3.5 How can I make the step to 0.5? I want the result: 1.5 2.0 2.5 3.0 3.5 Thanks. Cathy __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] R vs Numpy

2021-10-29 Thread Eric Berger
I think a Cheat Sheet that gives a side-by-side comparison of numpy and R would be relevant here. I found something like that for pandas and R (link below), but not for numpy. https://github.com/yl3738/Python-vs.-R-Cheatsheet/blob/main/community%20contribution_CC%20group14.pdf On Thu, Oct 28,

Re: [R] generate random numeric

2021-10-29 Thread Andrew Simmons
It might not be random, depending upon a seed being used (usually by set.seed or RNGkind). However, it's the best method for generating a random number within a specified range without weights. If you want weights, there are many other random number generation functions, most notably rnorm. You

[R] generate random numeric

2021-10-29 Thread Ken Peng
I saw runif(1) can generate a random num, is this the true random? > runif(1) [1] 0.8945383 What's the other better method? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see