On 11/04/2024 12:57 p.m., Dave Dixon wrote:
Backslashes in regex expressions in R are maddening, but they make sense.
R string handling interprets your replacement string "\\" as just one
backslash. Your string is received by gsub as "\" - that is, just the
control backslash, NOT the character
Backslashes in regex expressions in R are maddening, but they make sense.
R string handling interprets your replacement string "\\" as just one
backslash. Your string is received by gsub as "\" - that is, just the
control backslash, NOT the character backslash. gsub is expecting to see
\0,
Hi Duncan,
I only know about sub() and gsub().
There is no way to have pattern be a regular expression and replacement be
a fixed string.
Backslash is the only special character in replacement. If you need a
reference, see this file:
I noticed this issue in stringr::str_replace, but it also affects sub()
in base R.
If the pattern in a call to one of these needs to be a regular
expression, then backslashes in the replacement text are treated specially.
For example,
gsub("a|b", "\\", "abcdef")
gives "def", not
On 11/04/2024 12:58 p.m., Iris Simmons wrote:
Hi Duncan,
I only know about sub() and gsub().
There is no way to have pattern be a regular expression and replacement
be a fixed string.
Backslash is the only special character in replacement. If you need a
reference, see this file:
Hello!
I was trying to splice two wholesale price index deflators series which
have different base years. One of them is called wpi_def_nic2004(from 2005
to 2012), and another is called wpi_def_nic2008(from 2012 to 2019). I am
trying to create a single series such that the base year prices are
Hi R enthusiasts,
I am happy to announce a new package available on CRAN: fastTS
(https://cran.r-project.org/web/packages/fastTS/). fastTS is especially useful
for large time series with exogenous features and/or complex seasonality (i.e.
with multiple modes), allowing for possibly
Whatever you had as HTML was deleted. If that was data we did not get it.
1) manipulate wpi_def_nic2004 and wpi_def_nic2008 first so that the data are
compatible, then join them.
2) The full_join statement should explicitly state the columns to join by.
Using by=NULL joins by all the columns
I've tidied up the code for showing R plots as SVG in an Emacs
buffer;
it is now on melpa:
https://melpa.org/#/essgd
so package.el can grab it easily enough.
Best wishes,
Stephen
On Wed, Mar 27 2024, Stephen J. Eglen wrote:
I've got it now working locally so that the aspect ratio is
I'm working on a quarto template with ESS that runs 'R' code chunks .
When using RStudio, if there are parameters set in the yaml header, the
default values are available in code chunks (for testing the template).
However in ESS the `params$...` variables are not available. How would I
create
10 matches
Mail list logo