similar to: The regular expressions in compareVersion()

Displaying 20 results from an estimated 2000 matches similar to: "The regular expressions in compareVersion()"

2010 Jul 16
2
Recommended way of requiring packages of a certain version?
What is the recommended way of requiring a certain version when loading a package (or, indeed, from R itself)? Perl has the require module version use module version require version use version constructs which is kind of what I am looking for (especially 'use' which is evaluated at compile time), but R seems to have lost the version= argument to require(). The best I have been able
2010 Sep 18
1
Check for updates under Windows (Was: a reliable way to check the latest version of R on CRAN?)
Dear R developers, I asked this question in r-help list but have not got a definite solution yet, and I think it might be more appropriate to ask developers or CRAN maintainers directly. Many software packages often have a menu item like "Check for updates" under the "Help" menu, e.g. Filezilla and Firefox, and I believe it is also necessary for R (at least for R GUI under
2010 Sep 16
1
a reliable way to check the latest version of R on CRAN?
Hi all, We know old.packages() can check for updates of add-on packages, but is there a way to check updates of R itself? "go to R homepage" is a way, of course, but I hope this can be done by R. I'm not sure about the "reliable" place to check; here is a simple example to check from one of the CRAN webpages (kind of nasty approach...): x =
2024 Oct 17
1
Consider getNamespaceVersion() returning a numeric_version
On 17/10/2024 13:42, Tim Taylor wrote: > I mean the `numeric_version` object not a numeric (double/int). > Basically to protect me from myself I'd prefer not to have to remember > to wrap `getNamespaceVersion()` with `as.package_version()`. > > I suspect a grep of CRAN may highlight others who are erroneously > comparing character objects rather than a comparison between
2013 Feb 05
2
R Regular Expressions - Metacharacters
I thought that I can use metacharacters such as \w to match word characters with one backslash. But for some reason, I need to include two backslashes. > grepl(pattern='\w', x="what") Error: '\w' is an unrecognized escape in character string starting "\w" > grepl(pattern='\\w', x="what") [1] TRUE I can't find the reason for this
2018 Dec 06
2
Need for more hangup reasons in ARI?
Hi, while implementing an application based on ARI, I wanted to hangup calls in different states with different hangup reasons. After not finding anything in the documentation I found the possible reasons in the sources:(https://github.com/asterisk/asterisk/blob/4ca709768db9bafdfa83ee1cfc6cc0639f097857/res/ari/resource_channels.c#L866) I think, there are some important reasons missing. For
2017 May 15
4
Golang CertChecker hostname validation differs to OpenSSH
On Mon, May 15, 2017 at 11:39 AM, Peter Moody <mindrot at hda3.com> wrote: > my reading of the sshd manpage is that ssh is more permissive than it should be > > SSH_KNOWN_HOSTS FILE FORMAT : > ... > > A hostname or address may optionally be enclosed within `[' and `]' > brackets then followed by `:' and a non-standard port number. Hi Peter, I'm not
2010 Nov 19
1
a rounding option for \Sexpr{}?
Hi all, Currently Sweave does not format the (especially numeric) value in \Sexpr{}, and I often have to round() the numbers explicitly, otherwise I will get more than 10 digits, which is not necessary for me in most cases. Is there a way to specify the number of digits to be kept for values in \Sexpr{}? e.g. can we make \Sexpr{} respect getOption('digits')? Thanks! Regards, Yihui --
2010 May 28
1
require( "foo (>= 2.1)" )
Hello, I often find myself writing code like : if( require( "foo" ) && compareVersion( packageDescription( "foo")[["Version"]], "2.1" ) < 0 ){ # code that uses version 2.1 of foo } else { stop( "could not load version >= 2.1 of foo" ) } Would it make sense to include something like this in require, library, etc ... require(
2011 Oct 17
1
What does \Sexpr[results=rd]{} exactly mean in Rd?
Hi, I have spent a few hours on the R-exts manual and the documentation of parse_Rd() (as well as the PDF document in the references), but I still have not figured out what results=rd means. I thought I could use an R code fragment to create an Rd fragment dynamically. Here is an example, in which I was expected the output to be a describe list <DL> in HTML, but it turns out not to be true.
2014 May 30
1
R CMD check for the R code from vignettes
Hi, Recently I saw a couple of cases in which the package vignettes were somewhat complicated so that Stangle() (or knitr::purl() or other tangling functions) can fail to produce the exact R code that is executed by the weaving function Sweave() (or knitr::knit(), ...). For example, this is a valid document that can pass the weaving process but cannot generate a valid R script to be source()d:
2002 Jan 24
3
Best way to check/assert a certain version of or a package
When loading a package with library(APkg) or require(APkg) I would like to make sure that (1) the correct version of [R] is installed. If not an informative error message should be given. I would also like to make sure that (2) another required package which is loaded from within the APkg package (by require(OtherPkg)) is of a certain version or later. First of all, I believe that the check
2007 Feb 05
1
Build error with last R-devel tarball
Hi, On Windows, with last R-devel tarball (r40647) from ftp://ftp.stat.math.ethz.ch/Software/R/R-devel_2007-02-04.tar.gz I get the following build error: E:\biocbld\bbs-2.0-bioc\R\src\gnuwin32> make ... ... ---------- Making package utils ------------ adding build stamp to DESCRIPTION installing NAMESPACE file and metadata installing R files Error in namespaceExport(ns, exports) :
2016 Aug 11
0
Suppress LaTeX log during R CMD build
Hi, When a package's documentation contains \Sexpr{}, R CMD build will build the manual to PDF. I wonder if the full LaTeX log could be suppressed in this case. Currently it looks like this: $ R CMD build foo * checking for file ?foo/DESCRIPTION? ... OK * preparing ?foo?: * checking DESCRIPTION meta-information ... OK * installing the package to process help pages * building the PDF package
2011 Jan 05
2
convert expressions to characters
Hi, Suppose I have x = parse(text = " {y=50+50+50#'asfasf' } ") now x is an expression with some src attributes. > x expression({y=50+50+50#'asfasf' }) attr(,"srcfile") <text> attr(,"wholeSrcref") {y=50+50+50#'asfasf' } My question is, how can I get my string back (the string passed to parse() as the text argument)? >
2008 Aug 06
1
Matching a period in grep...
Hi folks, Can anyone enlighten me as to why I get the following when I search for ".csv" at the end of a string? > grep("\.csv$","Blah.csv",value=TRUE) [1] "Blah.csv" Warning messages: 1: '\.' is an unrecognized escape in a character string 2: unrecognized escape removed from "[\.]csv$" R reference for regular expressions says
2011 Apr 10
1
deparse operators in expressions
Hi, I observed a slight problem in deparse(): it will add spaces around most operators except /. I wonder if this is easy to fix. I know this is quite trivial, but I will appreciate if / is not treated as an exception. Examples: > deparse(expression(1/1)) [1] "expression(1/1)" > deparse(expression(1+1)) [1] "expression(1 + 1)" > deparse(expression(1%in%1)) [1]
2011 Apr 07
1
Two questions about metacharacter in regexprs and function return
for the script, please kindly see the script below. At line 10 and line 13, my problems occurs. The first one is I try to retrieve the gene official name from a column of a table. The pattern of official name is something starting with gene_name. For detail problems, please see the according lines. Any suggestions are appreciated example of matching source (extract the Nnat, sometime it would
2007 Jan 03
3
pb in regular expression with the character "-" (PR#9437)
Full_Name: FAN Version: 2.4.0 OS: Windows Submission from: (NULL) (159.50.101.9) These are expected: > grep("[\-|c]", c("a-a","b")) [1] 1 > gsub("[\-|c]", "&", c("a-a","b")) [1] "a&a" "b" but these are strange: > grep("[d|\-|c]", c("a-a","b")) integer(0)
2024 Oct 17
2
Consider getNamespaceVersion() returning a numeric_version
I mean the `numeric_version` object not a numeric (double/int). Basically to protect me from myself I'd prefer not to have to remember to wrap `getNamespaceVersion()` with `as.package_version()`. I suspect a grep of CRAN may highlight others who are erroneously comparing character objects rather than a comparison between a `numeric_version` object and a character. Tim On 17/10/2024