> Is there a reason that this slightly more explicit
> version [assign(envir=.GlobalEnv)] wouldn't work?
https://cran.r-project.org/web/packages/policies.html
- Packages should not modify the global environment (user’s workspace).
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Sep 3, 2020
I just tried this out with R-4.0.2 on Linux and it looks like
.Rbuildignore does not treat lines with '#'s as comments. E.g.,
% mkdir test test/inst
% touch 'test/inst/#octothorp.txt' 'test/inst/normal.txt'
% echo > test/DESCRIPTION 'Package: test\nVersion: 0.1\nTitle:
test\nDescription: A test o
You might make a second package that depends only on nimble and your
main package can then suggest that second package and JAGS.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Aug 5, 2020 at 3:36 PM Simon Bonner wrote:
>
> Hi all,
>
> I’m wondering if someone an offer advice on a problem I
R-4.0 introduced a new function, tools::R_user_dir(package, which),
where which is one of "data", "config", and "cache". It gives
standard directory names in which to place package-and-user-specific
files which you want to last longer than one R session.
I suppose you will still have to ask the u
'\0';
>
> F77_CALL(zhpevx)(cjobz, crange, cuplo, &n[0], ap, &vl[0], &vu[0], &il[0],
> &iu[0], &abstol[0], &m[0],
> w, z, &ldz[0], work, rwork, iwork, ifail, &info[0], strlen(cjobz),
> strlen(crange), strlen(cuplo));
>
>
> D
Have you tried what is recommended in
https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html
?
For arguments of CHARACTER type, the character length is passed as a
hidden argument at the end of the argument list. For deferred-length
strings, the value is passed by reference, ot
On Linux you can use 'ltrace' to get a list of all the environment
variables that R looks up. E.g., do the following in 'script' so all the
output is stored in a file ('typescript') and later look around in it for
the getenv calls.
$ R-devel --debugger=ltrace --debugger-args="-f -e getenv"
...
[p
And at least one widely used CRAN package defines `%:::%`, to mimic `:::`,
and uses it to use unexported functions from the tools package.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Jun 15, 2020 at 3:03 PM Balasubramanian Narasimhan <
na...@stanford.edu> wrote:
> At least one package
Use
Call[[1]] <- quote(survival::coxph)
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Jun 8, 2020 at 12:12 PM Göran Broström
wrote:
> Hello,
>
> the function 'coxreg' in my package 'eha' is often just a wrapper for
> 'coxph' in survival, so I have code like
>
> if (cox.ph){
>
% R-devel --vanilla --quiet
> library(Matrix)
> setClassUnion("mMatrix", c("Matrix", "matrix"))
Error in get(cname, envir = cwhere, inherits = FALSE) :
object '.__C__compMatrix' not found
Error in setClassUnion("mMatrix", c("Matrix", "matrix")) :
unable to create union class: could not set mem
openv="", inherits=TRUE
Tracing get(".SigLength", envir = env) on entry
x=".SigLength", envir="", topenv="", inherits=TRUE
Tracing get(".SigLength", envir = env) on entry
x=".SigLength", envir="", topenv="&q
INSTALL will give that warning if you have a pkg/src directory that
contains no files that look like C, C++, or Fortran files.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Feb 11, 2020 at 11:58 AM Mohsen Nabian
wrote:
> Greetings!
>
> How to resolve the following warning for my R packa
CRAN's check gives a warning
checking Rd \usage sections ... WARNING
Documented arguments not in \usage in documentation object 'Process chromR
objects':
‘...’
and man/proc_chromR.Rd on github does list '...' in the \arguments section
but no function listed in the \usage section uses '...'.
T
If mss$member is not a matrix you will get that error because setsiz will
be NULL.
> setsiz <- ncol( 33 )
> sample(1:3, setsiz)
Error in sample.int(length(x), size, replace, prob) :
invalid 'size' argument
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Jan 15, 2020 at 4:58 AM R
The Matrix package explicitly sets LazyData to "no" with a note saying that
it is necessary.
LazyData: no
LazyDataNote: not possible, since we use data/*.R *and* our classes
My notes on implementing install.packages() in TERR include
When R's install.packages() processes *.R files in the packag
Will the package build if you back out the "minor changes"? If so, what
were the minor changes (show diff output)?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Sep 30, 2019 at 12:24 PM Steve Gutreuter
wrote:
> I have a package which will no longer build after minor changes. The
> pro
> And now, I have another problem because the versions are usually
indicated using “>=”, for example:
> forecast (>=8.7) but I need to use exactly the versión 8.7 because
sometimes when packages are updated,
> they lost some functions. But if I use <= or == and the package is update
to versión 8.8,
You might be able to find where the error occurred by putting the following
lines in ~/.Rprofile
cat("~/.Rprofile: setting alternate error handler\n")
options(
error=quote({
dump.frames()
writeLines(c("Stack trace", paste0(" ",names(last.dump}))
Bill Dunlap
TIBCO Software
ppp has this body.
--- END OF FAILURE REPORT --
Fatal error: the condition has length > 1
* checking PDF version of manual ... OK
* DONE
Status: 1 ERROR, 1 NOTE
See
‘/tmp/bill/ppp.Rcheck/00check.log’
for details.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Jun 7, 201
The length-condition-not-equal-to-one checks will cause R to shutdown even
if the code in a tryCatch().
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Jun 7, 2019 at 7:47 AM Duncan Murdoch
wrote:
> On 07/06/2019 9:46 a.m., J C Nash wrote:
> > Should try() not stop those checks from forci
2/lib64/R/site-library/RcppEigen/include/Eigen/src/Core/MathFunctions.h"
--
# 295
"/home/R/R-3.5.2/lib64/R/site-library/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h"
return x + (y-x) * half(float(std::rand()) / float(2147483647));
# 412 "/home/R/R-3.5.2/lib64/R/site-library/Rc
.org/web/checks/check_results_BH.html
>
> Max
> ----------
> *From:* R-package-devel on behalf
> of William Dunlap
> *Sent:* March 29, 2019 12:05 PM
> *To:* Vissarion Fisikopoulos
> *Cc:* R Package Development
> *Subject:* Re: [R-pkg-devel] CRAN review
>
> It looks like it
Oops, RcppEigen does contain compiled code, but its header files include
much more code that doesn't get checked because it is not used in
RcppEigen.so.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Mar 29, 2019 at 9:35 AM William Dunlap wrote:
> The check only looks at compi
RAND_MAX);
}
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Mar 29, 2019 at 8:43 AM William Dunlap wrote:
> > Library lpSolveAPI uses rand() and srand() in lp_utils.c. We replace
> > both functions with GetRNGstate(); PutRNGstate(); unif_rand(); from
> > R’s interna
> Library lpSolveAPI uses rand() and srand() in lp_utils.c. We replace
> both functions with GetRNGstate(); PutRNGstate(); unif_rand(); from
> R’s internal random number generation routines as it is proposed in
> `Writing R Extensions`. Moreover if you run in folder `/src`:
> $ grep -r 'rand()'
> Y
hough, is there any way to debug the
> problem? I’ll assume that making repeated uploads to CRAN is not a viable
> approach it would be great if there were a Docker image of their setup
> available, for example.
>
> On Wed, 13 Mar 2019 at 17:00, William Dunlap wrote:
>
>>
The complaint
> test_check("huxtable")
-- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) --
`openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.
comes from your call to testthat::expect_silent()
test_that("Data written in
Is there rational for COMPILED_BY (a make variable on Windows) and
R_COMPILED_BY (an environment variable on Windows) differing?
> system(intern=TRUE, paste(file.path(R.home("bin"), "R"), "CMD config
COMPILED_BY"))
[1] "gcc-4.9.3"
> Sys.getenv("R_COMPILED_BY")
[1] "gcc 4.9.3"
The NEWS file for R-
The output of sessionInfo(), at the time of the error, would also be useful
- it will give the versions of devtools, pkgload, and all the other
packages that devtools requires.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Nov 8, 2018 at 8:32 AM, Kevin Ushey wrote:
> It would be easiest
After installing a new version of R the OP may have to rebuild (and retest)
packages like pkgload that define functions by grabbing functions from the
base package and modifying them, as in pkgload/R/namespace-env.r:
onload_assign("makeNamespace",
eval(
modify_lang(
extract_lang(body(l
It looks like affy is the culprit.
> requiredByCAMERA <- tools::package_dependencies("CAMERA",
recursive=TRUE)$CAMERA
> directlyRequired <- tools::package_dependencies(requiredByCAMERA)
> names(directlyRequired)[ vapply(directlyRequired,
function(x)"BiocInstaller"%in%x, FUN.VALUE=NA) ]
[1] "affy"
If there might be NA's in the response or predictors so na.exclude or
na.omit would remove
some rows as well, then using the row.names might be an easier way to match
up rows in
the original data with rows in gout$x.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Sun, Jul 8, 2018 at 11:04 AM, Ch
ity
> > across architectures. The choice of basis appears to use different
> > heuristics on 32-bit windows than on 64-bit Windows or Linux machines.
> As a
> > result, I can't include the tests I'd like as part of a CRAN submission.
> >
> > On Thu, May 17, 2018
Your explanation needs to be a bit more general in the case of identical
eigenvalues - each distinct eigenvalue has an associated subspace, whose
dimension is the number repeats of that eigenvalue and the eigenvectors for
that eigenvalue are an orthonormal basis for that subspace. (With no
repeate
The withr package has a bunch of simple functions executing code in various
contexts, e.g., in a given directory or with given options() settings:
> withr::with_dir
function (new, code)
{
old <- setwd(dir = new)
on.exit(setwd(old))
force(code)
}
> withr::with_dir(tempdir(), getwd())
[
I have a package that lets a user log into another system
and I want it to be sure to log the user out, at least by the
time the R session is over.
My Login(username,password) function stashes a token
(the username in my simplfied code) in an environment
and my Logout() function needs to use that
Instead of help(oldFunction) giving the example
oldFunction(x = something, option = "XYZ")
show the user, via comments in the example, how to convert the old usage to
the new
# replace oldFunction(x = something, option = "XYZ") by
newFunction(object = log(something), method = "XYZ-log")
On Linux you can trace all the getenv calls with ltrace. It only
works on ELF files, not sh scripts:
% R CMD ltrace -e getenv `R RHOME`/bin/*/R
libR.so->getenv("R_HOME")
= "/home/R/R-3.4.3/lib64/R"
libR.so->getenv("R_TRANSLATIONS")
= nil
libR.so->getenv("R_PLATFORM")
I think that assigning something to parent.frame() is bad practice, for the
same reasons that assigning to .GlobalEnv is bad. You could instead make
an environment in your package called, say, "TSEtools.env", with
TSETools.env <- new.env()
in some *.R file in the package's R directory. Export
You wrote
Exited with status -1073741819.
The low byte of that status code is 5, which I think means a segmentation
fault - reading
or writing an address that you do not have permission of use.
> as.hexmode(-1073741819)
[1] "c005"
If your code uses memory that it has not allocated it i
> However, I learned that I should change things like
> 'dat[5:8, 1]' to 'dat[[1]][5:8]', respecting the fact that a data frame
is a list
In the old days we encouraged the dat[i,j] usage because it worked
on both matrices and data.frames. Even now, the transformation to
dat[[j]][i] only works whe
I don't know about the current Sparc Fortran compilers, but over the
years have learned not to try to pass logicals and character strings
between C and Fortran. I have seen Fortran compilers that treated
integer -1 (all bits 1) as .true. and anything else as .false. and I
have see ones that looked
Use conditonMessage() to extract the message from an error, warning,
message, or other 'condition'
For more, see Hadley Wickham's book, "Advanced R":
http://adv-r.had.co.nz/Exceptions-Debugging.html
http://adv-r.had.co.nz/beyond-exception-handling.html
Bill Dunlap
TIBCO Software
wdunlap tibc
MAKEFLAGS='CXXFLAGS=-std=c++0x -O2' R CMD SHLIB
passes two items, 'CXXFLAGS=-std=c++0x' and '-O2', not the single item
'CXXFLAG=-std=c++0x -O2', to make. Suitably recent versions of GNU
make take the make argument -O2 to control the 'output-sync'.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
You can define the data in the R directory. You can keep it all in a *.R
file
by wrapping the text of the *.csv file in quotes and using
read.table(text="quoted stuff"), as in:
theData <- read.csv(header=TRUE, text="
English,Digit
One,1
Two,2
Three,3")
N <- nrow(theData)
You need to make sure 't
The MGGM package has the following in src/Makevars.win to tell the linker
to link with the Lapack, BLAS, and Fortran libraries.
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
Its Makevars file is identical - is that Makevars.win really needed? I
don't see Makevars or Makevars.win in your github
If I were writing a package for factoring integers I might store a vector
of known primes in an environment in my package and have my factoring
functions append to the list when they find some more primes. This works
because there is only one set of of primes (given we stick with ordinary
integers
This is not a complete answer to your problem, but here is an example of
how to make and store messages of a certain class, "lowMessage", and later
print a table of the messages and their counts.
> lowMessage <- function(text, call = sys.call(-1))
{
# make a message of class "lowMessage"
solved! Changing ‘ar’ to ‘$(AR)’ in the Makefile along with adding
> AR="$(AR)" to @(cd libmseed && $(MAKE) static CC="$(CC)"
> CFLAGS="$(CFLAGS)") in the Makevars.win fixed the problem.
>
> Thank you!
> Gillian Sharer
>
> > On Oc
Do you have a Makefile in the directory yourPackage/src/libmseed?
If so, how does it call 'ar' or '$(AR)'?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Oct 7, 2016 at 3:44 PM, Gillian Sharer
wrote:
> Thank you for your response. I apologize for asking basic questions, but
> I’m new to t
Currently exists("someName", where=someDataFrame) reports if "someName" is
an column
of the data.frame 'someDataFrame' and the 'where=' may be omitted. If we
have an
environment we use exsts("someName", envir=someEnvironment). It might be
nice to
continue using exists() instead of introducing a n
t;percent signs escaped". It just gets me back to
> the status 500 error. I think Dirk may be correct that it is a bug in the
> --as-can URL check.
>
> Paul
>
>
> On 12/14/2015 09:10 PM, William Dunlap wrote:
>>
>> Put backslashes in front of the percent signs
Put backslashes in front of the percent signs in the Rd file's URL:
\url{http://www.rug.nl/research/portal/publications/pub\%28d7d4ea3d-af1d-487a-b9b6-c0816994ef5a\%29.html}
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Dec 14, 2015 at 4:46 PM, Paul Gilbert wrote:
>
> I am having some
It may depend on your locale setting (see Sys.getlocale() and Sys.setlocale()).
In what locale is "/A/string" > "0"?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Dec 2, 2015 at 3:24 PM, Facundo Muñoz wrote:
> I have been struggling all day with this issue, which was terribly
> difficult
Try giving y a default value, NULL, in your plot.default:
plot.default <- function(x, y=NULL, ...)
graphics::plot(x, y, ...)
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Aug 31, 2015 at 7:37 PM, Gavin Simpson wrote:
> Why do you even need to take over `plot`, `plot.default`?
] "cdef" "Config"
#[7] "def"
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Aug 11, 2015 at 8:47 AM, William Dunlap wrote:
> This is a problem in the compiler package. Here is a way to reproduce it:
>
> def <- quote(Config &
This is a problem in the compiler package. Here is a way to reproduce it:
def <- quote(Config <- setRefClass("Config",
fields = list(
ConfigString = "character"),
methods = list(
# Constructor
initialize = function() {
ConfigString <<- "Hello, World!"
57 matches
Mail list logo