[R-pkg-devel] gettext on Solaris

2021-07-01 Thread Michael Chirico
My new submission potools failed on Solaris:

https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/potools-00check.html

Likely reason is that one or more of the SystemRequirements are missing (I
put gettext as a catchall in the DESCRIPTION but more specifically it needs
msgfmt, msgmerge, msginit and msgconv).

WRE mentions tests/examples should run without error when command-line
tools are unavailable, so I've added some escapes, but nevertheless I'm a
bit puzzled -- I expected these requirements would be easy to handle since
tools::update_pkg_po() has the same requirements.

Am I right that R's own default packages may be only partially functional
on CRAN checks?

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Removing import(methods) stops exporting S4 "meta name"

2024-03-14 Thread Michael Chirico
In an effort to streamline our NAMESPACE, we moved from blanket
'import(methods)' to specific importFrom(methods, ) for the
objects we specifically needed.

Doing so broke a downstream package, however, which has this directive:

importFrom(data.table,`.__T__[:base`)

That package stopped installing after the above change. I can get it
to install again by adding:

importClassesFrom(methods, "[")

to our package, but I'm not sure why this would be necessary. I'm
still left with two questions:

 1. How did we end up with ".__T__[:base" in our exports when we don't
do any S4 around '[' in the package (we do export S3 methods on it)?
 2. Is there any legitimate reason for a package to try and import
such an object? In other words, is breaking this downstream package by
not adding the 'importClassesFrom' workaround the right thing to do? I
don't see any other CRAN packages with a similar directive in its
NAMESPACE.

Michael Chirico

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Getting started with memory debugging

2019-01-13 Thread Michael Chirico
Hello all,

I'm getting started doing some debugging of memory errors and got stuck
trying to reproduce the errors found during my CRAN submission process:

https://cran.r-project.org/web/checks/check_results_geohashTools.html

Starting with the clang-ASAN issues, my approach was to try and use the
rocker/r-devel-san image.

Launching with the package directory mounted via:

docker run --rm -it -v
/Users/michael.chirico/github/geohashTools/:/home/docker/geohashTools
rocker/r-devel-san /bin/bash

Building required libraries:

apt-get update
apt-get install libgdal-dev libudunits2-dev

Then installing my Imports/Suggests:

Rscript -e "install.packages(c('Rcpp', 'sp', 'sf', 'testthat', 'mockery'))"

Now attempting to reproduce the memory errors:

cd /home/docker/geohashTools
RD CMD build .
RD CMD check geohashTools_0.2.0.tar.gz

But this is check is successful (I was hoping it'd fail)... I assume the
problem is from the last few steps. The manual says:

>
> It requires code to have been compiled and linked with -fsanitize=address


But I'm not sure how to enforce this (I assumed it was being handled by how
RD binary is built but I didn't notice any compilation output from R CMD
build .

Any help on getting started here would be appreciated :)
Michael Chirico

PS the source can be found at https://github.com/MichaelChirico/geohashTools

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Failed: Future File Timestamp Check

2025-02-07 Thread Michael Chirico
Actually, it looks like R CMD check has _intended_ to just skip in the
case the website is misbehaving:

https://github.com/r-devel/r-svn/blob/3578a3f858136a8abcd2f708f38a8dff6225ec42/src/library/tools/R/check.R#L549-L552

My guess is this test should be improved, currently we get (logical)
NA if the read throws an error, but not if the API returns but in an
unexpected format:

identical(as.POSIXct(NA), NA)
# [1] FALSE

I filed a bug & patch:

https://bugs.r-project.org/show_bug.cgi?id=18852

On Fri, Feb 7, 2025 at 1:54 PM Greg Hunt  wrote:
>
> Does all this mean that the check is not handling its own errors?
>
> On Sat, 8 Feb 2025 at 8:28 AM, Henrik Bengtsson 
> wrote:
>
> > > It has to have the "datetime" entry. If you can't fix your network you
> > can skip that test with
> > >
> > > _R_CHECK_FUTURE_FILE_TIMESTAMPS_=FALSE
> >
> > I'm quite sure that is overridden 'R CMD check' when using the
> > --as-cran flag. The workaround that I have found is to set environment
> > variable:
> >
> > _R_CHECK_SYSTEM_CLOCK_=FALSE
> >
> > I have observed  timing
> > out a lot over the last couple of months from several different
> > networks and hosts. I've seen it happen in the past too (last couple
> > of years), but it has got considerably worse recently. Maybe they're
> > throttling in per IP(?). I consider it quite unreliable these days, so
> > I use _R_CHECK_SYSTEM_CLOCK_=FALSE by default now.
> >
> > /Henrik
> >
> > On Tue, Feb 4, 2025 at 5:50 PM Simon Urbanek
> >  wrote:
> > >
> > > Josiah,
> > >
> > > that test tests the accuracy of the system clock by querying
> > https://worldtimeapi.org/api/timezone/etc/UTC so my guess would be that
> > you have either network or proxy issues which cause that request to fail by
> > providing garbage instead of the actual response.
> > >
> > > The call to test yourself is
> > > > readLines("http://worldtimeapi.org/api/timezone/etc/UTC";, warn=FALSE)
> > > [1]
> > "{\"utc_offset\":\"+00:00\",\"timezone\":\"Etc/UTC\",\"day_of_week\":3,\"day_of_year\":36,\"datetime\":\"2025-02-05T01:42:19.272728+00:00\",\"utc_datetime\":\"2025-02-05T01:42:19.272728+00:00\",\"unixtime\":1738719739,\"raw_offset\":0,\"week_number\":6,\"dst\":false,\"abbreviation\":\"UTC\",\"dst_offset\":0,\"dst_from\":null,\"dst_until\":null,\"client_ip\":\"121.98.39.155\"}"
> > >
> > > It has to have the "datetime" entry. If you can't fix your network you
> > can skip that test with
> > >
> > > _R_CHECK_FUTURE_FILE_TIMESTAMPS_=FALSE
> > >
> > > Cheers,
> > > Simon
> > >
> > >
> > > > On Feb 5, 2025, at 10:11 AM, Josiah Parry 
> > wrote:
> > > >
> > > > I'm running R CMD check for my package {calcite} (source:
> > > > https://github.com/r-arcGIS/calcite) which is failing due to what
> > *looks* like
> > > > a bug.
> > > >
> > > > R CMD check fails at "checking for future file timestamps"
> > > >
> > > > I get this error:  ...Error in if (abs(unclass(now_local) -
> > > > unclass(now)[1]) > 300) missing value where TRUE/FALSE needed.
> > > >
> > > > It seems that an NA is being generated somehow during this check but
> > I'm
> > > > unsure how.
> > > >
> > > > One thing that comes to mind is that the file that contains all of my
> > > > function definitions is generated using writeLines() but the output of
> > `
> > > > file.info()` looks normal to me.
> > > >
> > > > Have others encountered this? I'm on R 4.4.0 Puppy Cup
> > > >
> > > > platform   aarch64-apple-darwin20
> > > > arch   aarch64
> > > > os darwin20
> > > > system aarch64, darwin20
> > > > status
> > > > major  4
> > > > minor  4.0
> > > > year   2024
> > > > month  04
> > > > day24
> > > > svn rev86474
> > > > language   R
> > > > version.string R version 4.4.0 (2024-04-24)
> > > > nickname   Puppy Cup
> > > >
> > > >   [[alternative HTML version deleted]]
> > > >
> > > > __
> > > > R-package-devel@r-project.org mailing list
> > > > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> > > >
> > >
> > > __
> > > R-package-devel@r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] 'library' or 'require' call not declared

2025-02-06 Thread Michael Chirico
You haven't shared enough info to help well, but it looks like you use
package MASS in your demo/ directory without a corresponding entry in your
DESCRIPTION file.

Add MASS as Suggests or Imports should be enough.

If you point to where your code is on GitHub or another public-facing
repository it is easier to help more specifically.

On Thu, Feb 6, 2025, 7:57 PM Richard M. Heiberger  wrote:

> I don't understand what this message means
>
> Flavor: r-devel-linux-x86_64-debian-gcc
> Check: for unstated dependencies in 'demo', Result: NOTE
>  'library' or 'require' call not declared from: 'MASS'
>
> it is coming from HH_3.1-53.tar.gz that I sent in this evening.
> It is also visible for HH_3.1-52.tar.gz on the CRAN package check page
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package with JS dependency

2025-02-21 Thread Michael Chirico
Here are 2,800 JavaScript files in CRAN packages:

https://github.com/search?q=org%3Acran+path%3Amin.js+-path%3ALICENSE.txt&type=code

You might have a look at those. To Duncan's point, note there are also
0 min.js files:

https://github.com/search?q=org%3Acran+path%3Amin.js+-path%3ALICENSE.txt&type=code

Mike C

On Fri, Feb 21, 2025 at 9:01 AM Duncan Murdoch  wrote:
>
> On 2025-02-20 12:36 p.m., Brian Leonard wrote:
> > Hello there,
> >
> > [TLDR: I'm curious to know the degree to which including a pure javascript 
> > program (via the V8 package) in an R package affects the potential of 
> > passing CRAN review]
> >
> > I'm working on implementing an R package to support users of the Psych-DS 
> > data specification. The package will include a 
> > shiny app with helpful functions for assembling and publishing high-quality 
> > datasets in the behavioral sciences, but one of the core functions will be 
> > to validate existing datasets (local directories) according to the rules of 
> > our schema.
> >
> > We already have this validator functionality set up as a Deno application, 
> > and we can use certain Deno tools, along with esbuild, to generate 
> > node-based and pure-javascript bundled versions of validator.
> >
> > We'd like to be able to leverage our existing code instead of having to 
> > reinvent the wheel for the R context. If we try to publish our package to 
> > CRAN with this javascript script as a core part of the package's 
> > functionality, will that severely affect our chances of passing the review 
> > process? I know that having sufficient unit tests and well documented 
> > processes is crucial to getting a package through, but the validator code 
> > in this scenario would be stringy and minified, and the bundle would not 
> > include unit tests for all the validator's internal functions. Is it the 
> > case that a dependency like this is equally subject to CRAN review 
> > scrutiny, or would it be sufficient to have all the R-based components 
> > comply with CRAN requirements?
>
> I am not a member of CRAN, so I can't give you authoritative advice on
> this.  But I think one issue is that if you are only including minified
> code, then they wouldn't see that as the original source.  My rgl
> package includes a few thousand lines of Javascript code which is
> minified when installed; the tarball contains the original source.
>
> Duncan Murdoch
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package with JS dependency

2025-02-22 Thread Michael Chirico
Ah, thanks for looking into it further, I was a but surprised myself.
Apologies for the misstatement & added noise.

Could be that GitHub just doesn't index the potentially huge files, I've
come across that with my r-mailing-list-archive repo.

On Sat, Feb 22, 2025, 8:20 AM Jon Harmon  wrote:

> There are definitely packages with minified JS. I suspect this GitHub
> search policy is causing the empty search: "Vendored and generated code is
> excluded"
>
> Even with "is:generated" and/or "is:vendored", I can't get a search to find
> this, for example:
>
> https://github.com/cran/cookies/blob/eb72bda92734d7537061e008191c2041dbe49dff/inst/js/js.cookie.min.js
>
> On  Fri, 21 Feb 2025 09:06 AM Michael Chirico 
> wrote:
>
> > You might have a look at those. To Duncan's point, note there are also
> > 0 min.js files:
> >
> >
> >
> https://github.com/search?q=org%3Acran+path%3Amin.js+-path%3ALICENSE.txt&type=code
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] AlgDesign C Issue

2025-03-31 Thread Michael Chirico
Do you want to use  instead of your macros?

https://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html

On Mon, Mar 31, 2025, 12:37 AM Jerome Braun 
wrote:

>   Hi!
>
> I'm currently the maintainer of AlgDesign, though my C skill is clearly a
> little too low for the task.
>
> It has become necessary for me to fix some issues with the code that had
> defined true, false, and bool in the header file (wheeler.h).
>
> Lines 23 and 24 currently have:
>
> #define true 1
> #define false 0
>
> There used to be a line 25 that had:
>
> #define bool int
>
> I removed line 25 and changed all occurrences in the C code of "bool" to
> "int".   But this doesn't seem to have fully resolved the issue.
>
> The current checks on AlgDesign generate a warning based on header lines 23
> and 24:
>
> Debian: <
>
> https://win-builder.r-project.org/incoming_pretest/AlgDesign_1.2.1.2_20250331_023833/Debian/00check.log
> >
> Status: 1 WARNING, 1 NOTE
>
> I'm not sure what this means yet, nor how to resolve it properly.  I would
> love some help in working forward, if possible.
>
> Thank you very much!
> --
> Jerome
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] How and where do I document sysdata.rda

2025-03-20 Thread Michael Chirico
Here are about 60 CRAN packages discussing sysdata in their Rd files:

https://github.com/search?q=org%3Acran+path%3A.Rd+%2F%28%5B%5E%7B+%5D%7C%5B%5Ed%5D%5C%7B%29%5Cs*sysdata%2F&type=code

You might take a cue from them. Indeed \keyword{internal} is common there.

On Thu, Mar 20, 2025 at 9:57 AM Kevin R. Coombes 
wrote:

> If it is *only *in sysdata.Rda, then it is accessible to your package
> code but is not available to users. (They can't, for example, use the
> "data" function to load it themselves.) So, there is no reason to
> document it. Just like there is no reason to document functions in your
> R scripts that were not exported into user space. Of course, you can
> document those functions by using the keyword "internal" in an Rd file.
> I suspect that this would work to document your internal data set as well.
>
> On 3/20/2025 12:47 PM, Lists wrote:
> > Dear Jeff
> >
> > I am afraid that does not work if the data file is in sysdata.rda. I
> > had to remove my existing Rd file to get the package to pass checks.
> >
> > Michael
> >
> > On 20/03/2025 15:15, Jeff Newmiller wrote:
> >> Did you seriously look for instructions and not find [1]? And why do
> >> you think the answer should not involve Rd files? Documentation in R
> >> packages is what Rd files are for.
> >>
> >> If you don't want to mess with Rd files then you have no choice but
> >> to use something like the Roxygen package to mess with them for
> >> you... but that just kicks the can down the road .. Rd files are
> >> always involved.
> >>
> >> [1]
> >>
> https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Documenting-data-sets
> >>
> >> On March 20, 2025 7:39:39 AM PDT, Lists 
> wrote:
> >>> I want to put a look-up table into sysdata.rda to avoid having to
> >>> compute it everytime. At the moment I create it and save the
> >>> resulting file and then manually copy it to sysdata.rda. This works
> >>> but the package now contains no documentation about the look-up table.
> >>>
> >>> Most of the information which I turned up online involves doing it
> >>> all indirectly using various packages. I do not want to do that, I
> >>> am quite happy editing files by hand and moving them to where I want
> >>> them by hand. So what I need is to know where I should put the
> >>> documentation and what format it should be assuming it is not an Rd
> >>> file.
> >>>
> >>> Of course what I want may be impossible and I just need to document
> >>> it in the script which creates it but that seems messy.
> >>>
> >>> Michael Dewey
> >>>
> >>> __
> >>> R-package-devel@r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >>
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] New API in R-devel & minimum version of R

2025-04-04 Thread Michael Chirico
data.table is doing the same in a number of places, Ivan even went so far
as to pin down a specific SVN commit for those as well:

#if R_VERSION < R_Version(4, 5, 0) || R_SVN_REVISION < 86702
#  define isDataFrame(x) isFrame(x) // #6180
#endif

https://github.com/Rdatatable/data.table/blob/0909048017d35f8b8a910c74549650f5de5a74a9/src/data.table.h#L21-L23

Sneaking onto my soapbox to complain that it really seems incorrect that R
CMD check started complaining about these issues before the API-compliant
functions were included in an R release. I was really surprised to see
these functions were not included in the most recent past release, for
example.

Anyway, 4.5.0 is due for release in a few weeks so this will become moot
momentarily.

On Wed, Mar 19, 2025 at 8:19 AM Ben Bolker  wrote:

>FWIW  Rcpp handles this (for CLOENV) with an ifdef:
>
>  #if (defined(R_VERSION) && R_VERSION >= R_Version(4,5,0))
>  return R_ClosureEnv(fun);
>  #else
>  return CLOENV(fun);
>  #endif
>
>
> https://github.com/RcppCore/Rcpp/blob/257e1977cd6e251d0a3d691050ad43fa29cf9666/inst/include/Rcpp/Function.h#L102-L106
>
> On 3/19/25 11:08, Josiah Parry wrote:
> > I'm trying to work through some new WARNINGs that I am experiencing
> *only* in
> > R-devel.
> >
> >   Found non-API calls to R: ‘BODY’, ‘CLOENV’, ‘ENCLOS’, ‘FORMALS’
> >
> > Take FORMALS, for example. IIUC, we should now be using R_ClosureFormals
> > instead. However, my understanding is that this is available only in R
> 4.5
> > main trunk.
> >
> > If migrating to the R_ClosureFormals, should the minimum version of R for
> > the package be recorded in the DESCRIPTION as R >= 4.5?
> >
> > Additionally, I'm somewhat at a loss for how to pass CRAN checks for
> > R-release and R-devel while using only R_ClosureFormals to adhere to
> > R-devel WARNING.
> >
> > Should old versions have an upper bound on the supported R version as
> well
> > as a lower one e.g. Depends may have R >=4.1.0 <4.5.0?
> >
> > Thanks in advance for your advice / insight!
> >
> > - Josiah
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> --
> Dr. Benjamin Bolker
> Professor, Mathematics & Statistics and Biology, McMaster University
> Director, School of Computational Science and Engineering
> * E-mail is sent at my convenience; I don't expect replies outside of
> working hours.
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Functions requiring packages listed on Suggests

2025-05-08 Thread Michael Chirico
Just don't run those examples on machines lacking the Suggests packages.

With roxygen2 it's as easy as @examplesIf requireNamespace(p, quietly=TRUE).

On Thu, May 8, 2025, 8:19 AM Juan Antonio Garcia Martin <
ja.gar...@cnb.csic.es> wrote:

> Dear mantainers,
>
> I have a question, since one of my packages currently does not pass the
> onSuggest special check.
>
> Two functions of my package require some of the suggested packages
> either in CRAN (DiagrammeR, DiagrammeRsvg and rsvg) or Bioconductor (
> rtracklayer and GenomicRanges), also listed in the suggest section.
>
> The functions detect whether the suggested packages are installed and
> available, and return an error message indicating that the packages
> required to use the function.
>
> In fact DiagrammeR uses the same approach, the function export_graph
> requires both DiagrammeRsvg and rsvg, but they are not listed in the
> imports, it just returns a message when they are not installed.
>
> I have the option of removing the examples, or printing the same
> messages but returning from the functions instead of using stop. What is
> the preferred behavior in these cases?
>
> Best regards,
> Juan Antonio
>
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Run Examples Not Found

2025-05-07 Thread Michael Chirico
Hi Mat, glancing at what I believe to be your package sources [1]

You have non-R exposition in your \examples{...}. Examples are code --
you should be able to run them like any other code.

Moreover, they should be self-contained -- expecting the user to
create 'oildata' themselves won't work.

Why not use

oildata <- read.csv(system.file("extdata", "oildata.csv", package="olr"))

Inside the example instead?

You might also consider turning 'oildata' into a proper data object
exported by your package [2]

Mike C

PS your text got mangled, it's quite hard to read your message -- I've
made a best effort to do so. Look how it renders [3]. Please turn on
'Plain text mode' for messages to this list to avoid this issue.

[1] 
https://github.com/MatHatter/olr_r/blob/4eeca43a947823aa97cbc9bafc43401c2848/olr/man/olr.Rd#L38-L51
[2] 
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Data-in-packages
[3] https://stat.ethz.ch/pipermail/r-package-devel/2025q2/011641.html

On Wed, May 7, 2025 at 1:11 PM Mat Fok via R-package-devel
 wrote:
>
> Hi,
> My example sources data from olr/inst/extdata and I point to it in my 
> example. I do not include the `dontrun{}` function around this @examples as I 
> want to be able to click "Run Examples" in my Help documentation but I get 
> the error /Example/olr not found. I was thinking maybe I should have a folder 
> called Example, but ChatGPT said no. I have searched online for this but the 
> most relevant thing I have found was 
> stackoverflow.com/questions/76365640/r-roxygen-examples-example-foo-bar-not-found,
>  but no one answered and it is over a year old.
>
> |
> |
> |
> |  |  |
>
>  |
>
>  |
> |
> |  |
> R Roxygen @examples /Example/foo_bar not found
>
> I am creating an R package and can't run the examples when using 
> devtools::load_all()I always get /Example/func...
>  |
>
>  |
>
>  |
>
>
>
> Here is my example:
> #' @examples#' # Option 1: Manual loading from package (if preferred)#' # 
> file <- system.file("extdata", "crudeoildata.csv", package = "olr", mustWork 
> = TRUE)#' # crudeoildata <- read.csv(file, header = TRUE)#' # dataset <- 
> crudeoildata[, -1]#'#' # Option 2: Preferred - using load_custom_data()#' 
> dataset <- load_custom_data("crudeoildata.csv", exclude_first_column = 
> TRUE)#'#' responseName <- "CrudeOil"#' predictorNames <- c("RigCount", "API", 
> "FieldProduction", "RefinerNetInput",#'   "OperableCapacity", "Imports", 
> "StocksExcludingSPR", "NonCommercialLong",#'   "NonCommercialShort", 
> "CommercialLong", "CommercialShort", "OpenInterest")#'#' olr(dataset, 
> responseName, predictorNames, adjr2 = FALSE)
> Here is my file structure:
> olr/├── DESCRIPTION├── NAMESPACE├── .Rhistory├── R/│   ├── olr_function.R│   
> └── utils.R├── man/│   ├── olr.Rd│   └── load_custom_data.Rd└── inst/└── 
> extdata/└── crudeoildata.csv
> How do I Run Examples properly?
> Thanks,
> Mathew Fok
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel