Giter VIP home page Giter VIP logo

gsubfn's People

Contributors

ggrothendieck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gsubfn's Issues

Warning about "partial argument match"

options(
  warnPartialMatchArgs = TRUE,
  warnPartialMatchAttr = TRUE,
  warnPartialMatchDollar = TRUE
)
list[a, b] = list(1, 2)

gives

Warning message:
In seq.default(along = args) :
  partial argument match of 'along' to 'along.with'
Calls: [<- -> [<-.result -> seq

output as list with engine = "R"

In the following a list is output where a plain vector is expected. If engine = "R" is omitted then it runs correctly.

xx <- c("1 year 1 month", "11 \nmonths", "3 years 11 months", "1 year 1 month", 
"8 months", "2 years")
strapply(xx, "(\\d+) +\\W*m", as.numeric, empty = 0, simplify = TRUE, engine = "R")

Not possible to load package in R 4.0.3

Installation works fine, but loading package produces a illegal operation.

*** caught illegal operation *** address 0x7fffc435ee97, cause 'illegal opcode'

Not possible to load package in R 4.0.3

Installation works fine, but loading package produces a illegal operation.

*** caught illegal operation *** address 0x7fffc435ee97, cause 'illegal opcode'

cannot get package to load in R 4.0.4 (2021-02-15)

Hi there!

I have recently switched laptops and am on the version 4.0.4 of R and although install.packages("gsubfn") installs the package when I try to call the package from my library or to call gsubfn via gsubfn::gsubfn() R gets stuck running a process for an insane amount of time (I gave up at 30 mins). Do you have any idea what the problem could be? Is there some dependency that I am unaware of?

Many thanks

R freezing

Hello,

I am using R 3.5.0 and every time I try to load the package it causes R to freeze. In order to do anything with R again I have to force quit out of RStudio to even start using it again.

I was finally able to work around this by typing:
options(gsubfn.engine = "R")
into the command prompt first before trying to load gsubfn.

best
MB

Escaping Backticks in String Interpolation in `gsubfn`

a <- 10
b <- 5

fn$c("Hello $a + $b should equal `a + b`, but `don't evalute me`, $b")

I would want to be able to escape the second pair of backticks, or dollar signs e.g.:

fn$c("Hello $a + $b should equal `a + b`, but ``don't evalute me``, $$b")
## "Hello 10 + 5 should equal 15, but `don't evalute me`"

I think this can be achieved by changing pattern in:

if (missing(pattern)) pattern <- "[$]([[:alpha:]][[:alnum:].]*)|`([^`]+)`"

To something like (with perl=T):

"(?<!\\$)[$]([[:alpha:]][[:alnum:].]*)|`(?<!`)`([^`]+)`(?!`)`"

This type of escaping is probably simpler than anything involving backslashes given those have special meaning within R and with regexes as well. The only unfortunate thing is this is different to how the formula escaping works, where ~~ is the function.

Additionally, one complication is that we need to make sure that things like:

``don't evaluate me``

are not only not evaluated, but also converted to

`don't evaluate me`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.