Displaying 20 results from an estimated 29 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
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,] . | . . ....
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...
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
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
2015 Oct 04
2
Conditional importFrom (roxygen?)
Folks:
I am getting a build failure when I:
#' @importFrom utils shortPathName
which roxygenizes it to the NAMESPACE.
I suspect this is because this particular function is Windows-only, but I'm
a bit confused how I should "properly" importFrom a function like this so
it doesn't cause a build failure, but I don't get a note in my R CMD CHECK
if I DON'T have it:
2015 Jan 22
5
:: and ::: as .Primitives?
Hi all,
When S4 methods are defined on base function (say, "match"), the
function becomes a method with the body "base::match(x,y)". A call to
such a function often spends more time doing "::" than in the function
itself. I always assumed that "::" was a very low-level thing, but it
turns out to be a plain old function defined in base/R/namespace.R.
What
2020 Jan 21
2
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
....* of class \"", '', msg))
> if(is.language(x) || is.function(x))
> clm
> else {
> cl <- str2lang(clm)
> if(is.symbol(cl)) as.character(cl) else eval(cl)
> }
> }
>
> ## str2lang() needs R >= 3.6.0:
> if(getRversion() < "3.6.0") ## substitute for str2lang(), good enough here:
> str2lang <- function(s) parse(text = s, keep.source=FALSE)[[1]]
>
>
> Now you can look at such things yourself:
>
> ## --------------------- the "interesting" cases : ---
> ## in...
2017 Oct 24
0
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
>>>>> Benjamin Tyner <btyner at gmail.com>
>>>>> on Tue, 24 Oct 2017 07:21:33 -0400 writes:
> Jeff,
> Thank you for your reply. The intent was to construct a minimum
> reproducible example. The same warning occurs when the 'file' argument
> points to a file on disk with a million lines. But you are correct, my
>
2017 Oct 24
2
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
Jeff,
Thank you for your reply. The intent was to construct a minimum
reproducible example. The same warning occurs when the 'file' argument
points to a file on disk with a million lines. But you are correct, my
example was slightly malformed and in fact gives an error under R
version 3.2.2. Please allow me to try again; in older versions of R,
?? > read.table(file =