meireles / spectrolab

Dealing with spectral data in R
16 stars 11 forks source link

It appears docs aren't completely matching latest code #14

Closed serbinsh closed 4 years ago

serbinsh commented 4 years ago
>   devtools::install_github("meireles/spectrolab")
Downloading GitHub repo meireles/spectrolab@HEAD
✓  checking for file ‘/private/var/folders/xp/h3k9vf3n2jx181ts786_yjrn9c2gjq/T/RtmpSp0H0D/remotesbf2c6fee62d2/meireles-spectrolab-8e7799c/DESCRIPTION’ (680ms)
─  preparing ‘spectrolab’: (393ms)
✓  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘spectrolab_0.0.10.tar.gz’
   Warning: invalid uid value replaced by that for user 'nobody'

Installing package into ‘/Users/sserbin/R/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘spectrolab’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (spectrolab)

Restarting R session...

> head(spectrolab::wavelengths(spec.files))
Error: 'wavelengths' is not an exported object from 'namespace:spectrolab'
> wavelengths(spec.files)
Error in wavelengths(spec.files) : could not find function "wavelengths"
> bands(spec.files)
Error in bands(spec.files) : could not find function "bands"

But the latest docs still show the wavelength() function. At the same time, being able to extract that info was handy but its not clear how to do that now? I really liked the old spectra class and wonder if we can maintain that functionality OR maybe I just need some help to show how I should be doing something like

wavelengths(spec.files, subset_waves[1], subset_waves[2])

Now, for example

spec_sub_vnirswir1 <- spec.files[ , wavelengths(spec.files, subset_waves[1], subset_waves[2]) ]

Thanks

serbinsh commented 4 years ago

Apologies, I think I sorted this specific issue out

spectrolab::bands(spec.files)

I may close this in a minute after I confirm! But I do think the docs should be updated because it still contains a reference to wavelength()

serbinsh commented 4 years ago

.....sorry, its been a long day already. I was mixing up doc version based on installing different versions. Ignore this!