Displaying 20 results from an estimated 34 matches for "getrversion".
Did you mean:
get_version
2007 Oct 22
3
retrieve version information for a package?
Hi,
I am looking for a way to find out the version information of
installed R packages.
ex:
>library(affy)
>SOME_COMMAND_FOR_VERSION(affy)
I know I can do either getRversion() or R.Version() could give me the
version of R. I assume there must be a way for me to get version
information for the add-on paclages,right?
Thanks!
Yupu
2018 Jan 27
1
R (>= 3.4.0): integer-to-double coercion in comparisons no longer done (a good thing)
Hi,
there was a memory improvement done in R going from R 3.3.3 to R 3.4.0
when it comes to comparing an integer 'x' an double 'y' (either may be
scalar or vector).
For example, in R 3.3.3, I get:
> getRversion()
[1] '3.3.3'
> x <- integer(1000)
> y <- double(1000)
> profmem::profmem(z <- (x < y))
Rprofmem memory profiling of:
z <- (x < y)
Memory allocations:
bytes calls
1 8040 <internal>
2 4040 <internal>
total 12080
>
and in R 3.4....
2016 May 10
1
complex NA's match(), etc: not back-compatible change proposal
...all differ:
> ## a version that works in older versions of R, where identical() had fewer arguments!
> outerID.picky <- function(x,y) {
+ nF <- length(formals(identical)) - 2
+ do.call("outerID", c(list(x, y), as.list(rep(FALSE, nF))))
+ }
> oldR <- !exists("getRversion") || getRversion() < "3.0.0" ## << FIXME: 3.0.0 is a wild guess
> symnum(id.z <- outerID.picky(z,z)) ## == Diagonal matrix [newer versions of R]
[1,] | . . . . . . . . . . .
[2,] . | . . . . . . . . . .
[3,] . . | . . . . . . . . .
[4...
2016 May 13
1
complex NA's match(), etc: not back-compatible change proposal
...older versions of R, where identical() had fewer arguments!
>> outerID.picky <- function(x,y) {
> + nF <- length(formals(identical)) - 2
> + do.call("outerID", c(list(x, y), as.list(rep(FALSE, nF))))
> + }
>> oldR <- !exists("getRversion") || getRversion() < "3.0.0" ## << FIXME: 3.0.0 is a wild guess
>> symnum(id.z <- outerID.picky(z,z)) ## == Diagonal matrix [newer versions of R]
> [1,] | . . . . . . . . . . .
> [2,] . | . . . . . . . . . .
>...
2015 Oct 04
2
Conditional importFrom (roxygen?)
...This has been submitted as an issue at
https://github.com/klutometis/roxygen/issues/378
closely related:
https://github.com/klutometis/roxygen/issues/371
my current hacky solution to this is to use a Makefile that
post-processes the NAMESPACE after it's roxygenized, e.g. search
for "getRversion" in
https://github.com/glmmTMB/glmmTMB/blob/master/Makefile
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
...t gmail.com> wrote:
> I haven't done the archaeology to figure out when this broke/exactly
> what change in the R code base broke it: it happened within the last
> month or so
binomial() itself exhibits this property even in R-4.2.2 from more than
two years ago:
R -q -s -e 'getRversion(); binomial()$linkinv(1L)'
# [1] ?4.2.2?
# Error in binomial()$linkinv(1L) :
# REAL() can only be applied to a 'numeric', not a 'integer'
It's the `etas` [1] that suddenly became integer due to a change in
seq.int():
R -q -s -e 'str(seq.int(-8, 8, by=1))'
# num...
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
...haven't done the archaeology to figure out when this broke/exactly
>> what change in the R code base broke it: it happened within the last
>> month or so
>
> binomial() itself exhibits this property even in R-4.2.2 from more than
> two years ago:
>
> R -q -s -e 'getRversion(); binomial()$linkinv(1L)'
> # [1] ?4.2.2?
> # Error in binomial()$linkinv(1L) :
> # REAL() can only be applied to a 'numeric', not a 'integer'
>
> It's the `etas` [1] that suddenly became integer due to a change in
> seq.int():
>
> R -q -s -e ...
2016 May 28
1
complex NA's match(), etc: not back-compatible change proposal
...tical() had fewer
arguments!
? ? >>> outerID.picky
<- function(x,y) {
? ? >> +?
???nF <- length(formals(identical)) - 2
? ? >> +?
???do.call("outerID", c(list(x, y),
as.list(rep(FALSE, nF))))
? ? >> +
}
? ? >>> oldR <-
!exists("getRversion") || getRversion() <
"3.0.0" ## << FIXME: 3.0.0 is? a wild
guess
? ? >>> symnum(id.z <-
outerID.picky(z,z)) ## == Diagonal matrix [newer versions of
R]
? ? ? ? ? ? ? ? ? ? ? ? ?
???
? ? >> [1,] | . . . .
. . . . . . .
? ? >> [2,] . | . . ....
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
...eology to figure out when this broke/exactly
>>> what change in the R code base broke it: it happened within the last
>>> month or so
>>
>> binomial() itself exhibits this property even in R-4.2.2 from more than
>> two years ago:
>>
>> R -q -s -e 'getRversion(); binomial()$linkinv(1L)'
>> # [1] ?4.2.2?
>> # Error in binomial()$linkinv(1L) :
>> #?? REAL() can only be applied to a 'numeric', not a 'integer'
>>
>> It's the `etas` [1] that suddenly became integer due to a change in
>> seq.int():
&g...
2010 Jul 16
2
Recommended way of requiring packages of a certain version?
...The best I have been able to come up with are constructs of the form
if ( utils::compareVersion(utils::packageDescription("data.table",
fields="Version"), "1.5") < 0 ) stop("Need data.table version 1.5 or later")
if ( utils::compareVersion(as.character(getRversion()), "2.11") >= 0 )
stop("Does not work yet with latest R.")
But this is tedious and error prone. I have created my own require()
function to automate this (it takes a vector of versions and a vector of
comparisons and only load the package if they are all met), but it is...
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
...broke/exactly
>>>> what change in the R code base broke it: it happened within the last
>>>> month or so
>>>
>>> binomial() itself exhibits this property even in R-4.2.2 from more than
>>> two years ago:
>>>
>>> R -q -s -e 'getRversion(); binomial()$linkinv(1L)'
>>> # [1] ?4.2.2?
>>> # Error in binomial()$linkinv(1L) :
>>> # REAL() can only be applied to a 'numeric', not a 'integer'
>>>
>>> It's the `etas` [1] that suddenly became integer due to a change in
&...
2012 Jun 23
1
globalVariables()
...quot;", globals)
globals <- sub(" *$", "", globals)
whichentries <- which(grepl(":", globals))
globals <- globals[-whichentries]
globals <- gsub(".* ", "", globals)
globals <- unique(globals)
cmd <- paste("if (getRversion() >= '2.15.1') globalVariables(c(",
paste(globals, collapse=", "), "))", sep="")
cmd <- strwrap(cmd)
writeLines(cmd, fileout)
}
------------- snip ------------
Any help would be appreciated.
John
------------------------------...
2016 Jun 03
0
complex NA's match(), etc: not back-compatible change proposal
...{
? ? > ? ? >> +?
? ? > ???nF <- length(formals(identical))
- 2
? ? > ? ? >> +?
? ? > ???do.call("outerID", c(list(x, y),
? ? > as.list(rep(FALSE, nF))))
? ? > ? ? >> +
? ? > }
? ? > ? ? >>> oldR <-
? ? > !exists("getRversion") || getRversion()
<
? ? > "3.0.0" ## << FIXME: 3.0.0 is? a
wild
? ? > guess
? ? > ? ? >>> symnum(id.z <-
? ? > outerID.picky(z,z)) ## == Diagonal matrix
[newer versions of
? ? > R]
? ? > ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? > ???
? ? >...
2011 Dec 16
2
R package BibTex entries: looking for a more general solution
...e help?
You can see the result from this at
http://euclid.psych.yorku.ca/SCS/Private/Rbibs/Rpackages-2.14.0.bib
The function is also at:
# Original code by Achim Zeileis, 16 Dec 2009, R-help
# Added: support header and preamble
Rpackages.bib <- function(filename = paste("Rpackages-",getRversion(),
".bib", sep=""),
header=TRUE, preamble=NULL, suppress.warnings=TRUE, verbose = TRUE)
{
## installed packages
pkgs <- unique(installed.packages()[,1])
if (suppress.warnings) warn <- options(warn=-1)
bibs <- lapply(pkgs, function(x) try(toBibtex(c...
2008 Feb 25
4
New version of X11, png and jpeg
...not currently the default, but can be made so by
setting X11.options(type="Cairo"), e.g. as a load hook for package
grDevices. I am using
setHook(packageEvent("grDevices", "onLoad"),
function(...) {
grDevices::ps.options(horizontal=FALSE)
if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo")
})
Please try these out and let us know how you get on. As a check, try the
TestChars() examples in ?points - on one Solaris 10 system a few of the
symbol font characters were incorrect. It worked on an FC5 system wi...
2015 Oct 04
0
Conditional importFrom (roxygen?)
...t; https://github.com/klutometis/roxygen/issues/378
>
> closely related:
>
> https://github.com/klutometis/roxygen/issues/371
>
> my current hacky solution to this is to use a Makefile that
> post-processes the NAMESPACE after it's roxygenized, e.g. search
> for "getRversion" in
>
> https://github.com/glmmTMB/glmmTMB/blob/master/Makefile
Hadley has the right idea (allow roxygen to specify some uninterpreted
text to drop into the NAMESPACE file), but it doesn't go far enough.
Really this is a design flaw in roxygen: being able to enter NAMESPACE
and he...
2024 Mar 27
1
paths capability FALSE on devel?
On 27/03/2024 10:28, Alexandre Courtiol wrote:
> Hi all,
>
> I don't know if it is a local issue on my hands or not, but after
> installing R-devel the output of grDevices::dev.capabilities()$paths is
> FALSE, while it is TRUE for R 4.3.3.
> Relatedly, I have issues with plotting paths on devel.
>
> At this stage, I simply would like to know if others running R devel
2010 Sep 16
1
a reliable way to check the latest version of R on CRAN?
...kind of nasty
approach...):
x = readLines("http://cran.r-project.org/sources.html")
# the version number is in the next line of 'The latest release'
rls = x[grep("latest release", x) + 1L]
newver = gsub("(.*R-|\\.tar\\.gz.*)", "", rls)
oldver = paste(getRversion(), collapse = ".")
# new version available?
compareVersion(newver, oldver) == 1L
Thanks!
Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
2025 Jan 08
1
binomial()$linkinv no longer accepts integer values
As of r87537, binomial()$linkinv no longer accepts integer arguments.
binomial()$linkinv(1.0) ## 0.7310586
binomial()$linkinv(1L)
Error in binomial()$linkinv(1L) :
REAL() can only be applied to a 'numeric', not a 'integer'
Since R is usually so permissive/sloppy with the distinction between
integers and numeric/doubles, I'd argue that this is a bug ...
(This came
2010 Sep 18
1
Check for updates under Windows (Was: a reliable way to check the latest version of R on CRAN?)
...kind of nasty
approach...):
x = readLines("http://cran.r-project.org/sources.html")
# the version number is in the next line of 'The latest release'
rls = x[grep("latest release", x) + 1L]
newver = gsub("(.*R-|\\.tar\\.gz.*)", "", rls)
oldver = paste(getRversion(), collapse = ".")
# new version available?
compareVersion(newver, oldver) == 1L
Thanks!
Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA