Your file seems to be encoded as UTF-8-BOM.
When I read it in on my Windows 10 machine the Title column has extra characters at the front ("�..Title"), which is why your function returns "no object found" when checking for the Title column. If I resave your file with UTF-8 format your function works as expected and I am able to install your package. Gavin ________________________________ From: Bioc-devel <bioc-devel-boun...@r-project.org> on behalf of Murphy, Alan E <a.mur...@imperial.ac.uk> Sent: 02 March 2021 17:00 To: bioc-devel@r-project.org Subject: [Bioc-devel] ExperimentHub package development - Windows OS specific error Hi all, My apologies, I have emailed before on a related issue but now think I have found a potential cause of the issue I am having but can't seem to find a fix. I am working on an ExperimentHub data package; ewceData<https://github.com/neurogenomics/ewceData>, which fails checks on Windows OS but passes on Linux and Mac. On Windows, the package fails to install with the following output: Error: package or namespace load failed for 'ewceData': .onLoad failed in loadNamespace() for 'ewceData', details: call: fun(libname, pkgname) error: no objects found Error: loading failed Execution halted It seems like this error is caused by my onload function. The onload function I use (zzz.R) should allow easy access to the stored datasets, allowing a user to call the dataset like dataset1(). The error note printed appears because the metadata.csv file did not read properly .onLoad <- function(libname, pkgname) { objs <- read.csv(system.file("extdata", "metadata.csv", package="ewceData"), stringsAsFactors=FALSE)$Title if (!length(objs)) stop("no objects found") It would seem the issue is with either read.csv or system.file and is specific to Windows OS. Just to note I also do import read.csv from utils. If anyone has come across an issue like this before or have good guesses for a possible fix it would be greatly appreciated? Kind regards, Alan, Alan Murphy Bioinformatician Neurogenomics lab UK Dementia Research Institute Imperial College London [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel [[alternative HTML version deleted]]
_______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel