alexzhu1998 / RaspberryPiR

This is an R package designed to transfer Raspberry Pi sensor data into R using Rcpp and WiringPi
MIT License
3 stars 0 forks source link

CRAN submission #7

Open alexzhu1998 opened 2 years ago

alexzhu1998 commented 2 years ago

Need #4 to continue.

alexzhu1998 commented 2 years ago

R CMD check --as-cran RaspberryPiR

alexzhu1998 commented 2 years ago

New submission

The Title field should be in title case. Current version is: ‘R package for collecting and analysing streaming data on Raspberry Pi’ In title case that is: ‘R Package for Collecting and Analysing Streaming Data on Raspberry Pi’

The Date field is over a month old.

The build time stamp is missing.

In addition to the above warning(s), found the following notes:

Found the following apparent object files/libraries: src/utils/DHT11.o src/utils/MQ2.o src/utils/PhotoRes.o src/utils/RPiCam.o src/utils/sensors_control.o src/utils/shared_memory.o Object files/libraries should not be included in a source package.

CRAN-pack does not know about .git

Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.

alexzhu1998 commented 1 year ago

To generate documentations: roxygen2::roxygenize('.', roclets=c('rd', 'collate', 'namespace'))

alexzhu1998 commented 1 year ago

checking R code for possible problems ... NOTE DHT11_freeMemory: no visible binding for global variable ‘_RaspberryPiR_DHT11_freeMemory’ DHT11_readMemory: no visible binding for global variable ‘_RaspberryPiR_DHT11_readMemory’ DHT11_writeMemory: no visible binding for global variable ‘_RaspberryPiR_DHT11_writeMemory’ LL_digitalRead: no visible binding for global variable ‘_RaspberryPiR_LL_digitalRead’ LL_digitalWrite: no visible binding for global variable ‘_RaspberryPiR_LL_digitalWrite’ LL_micros: no visible binding for global variable ‘_RaspberryPiR_LL_micros’ LL_millis: no visible binding for global variable ‘_RaspberryPiR_LL_millis’ LL_pinMode: no visible binding for global variable ‘_RaspberryPiR_LL_pinMode’ LL_pullUpDnControl: no visible binding for global variable ‘_RaspberryPiR_LL_pullUpDnControl’ LL_wiringPiSetup: no visible binding for global variable ‘_RaspberryPiR_LL_wiringPiSetup’ PhotoRes_freeMemory: no visible binding for global variable ‘_RaspberryPiR_PhotoRes_freeMemory’ PhotoRes_readMemory: no visible binding for global variable ‘_RaspberryPiR_PhotoRes_readMemory’ PhotoRes_writeMemory: no visible binding for global variable ‘_RaspberryPiR_PhotoRes_writeMemory’ simpleCapture: no visible binding for global variable ‘_RaspberryPiR_simpleCapture’ testing_freeMemory: no visible binding for global variable ‘_RaspberryPiR_testing_freeMemory’ testing_readMemory: no visible binding for global variable ‘_RaspberryPiR_testing_readMemory’ testing_writeMemory: no visible binding for global variable ‘_RaspberryPiR_testing_writeMemory’ testingDHT: no visible binding for global variable ‘_RaspberryPiR_testingDHT’ testingMQ2: no visible binding for global variable ‘_RaspberryPiR_testingMQ2’ testingPhotoRes: no visible binding for global variable ‘_RaspberryPiR_testingPhotoRes’ Undefined global functions or variables: _RaspberryPiR_DHT11_freeMemory _RaspberryPiR_DHT11_readMemory _RaspberryPiR_DHT11_writeMemory _RaspberryPiR_LL_digitalRead _RaspberryPiR_LL_digitalWrite _RaspberryPiR_LL_micros _RaspberryPiR_LL_millis _RaspberryPiR_LL_pinMode _RaspberryPiR_LL_pullUpDnControl _RaspberryPiR_LL_wiringPiSetup _RaspberryPiR_PhotoRes_freeMemory _RaspberryPiR_PhotoRes_readMemory _RaspberryPiR_PhotoRes_writeMemory _RaspberryPiR_simpleCapture _RaspberryPiR_testing_freeMemory _RaspberryPiR_testing_readMemory _RaspberryPiR_testing_writeMemory _RaspberryPiR_testingDHT _RaspberryPiR_testingMQ2 _RaspberryPiR_testingPhotoRes

Fixed with a pre-defined global variables function

alexzhu1998 commented 1 year ago

devtools::check("RaspberryPiR")

alexzhu1998 commented 1 year ago

❯ checking compiled code ... NOTE File ‘RaspberryPiR/libs/RaspberryPiR.so’: Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’

It is good practice to register native routines and to disable symbol search.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.

alexzhu1998 commented 1 year ago

Added the following file src/init.cpp to fix the above NOTE.

// Generated by the rstantools package

include <R.h>

include

include <R_ext/Rdynload.h>

include <R_ext/Visibility.h>

include

void attribute_visible R_init_RaspberryPiR(DllInfo *dll) { // next line is necessary to avoid a NOTE from R CMD check R_registerRoutines(dll, NULL, NULL, NULL, NULL); R_useDynamicSymbols(dll, TRUE); // necessary for .onLoad() to work }