isoverse / clumpedr Goto Github PK
View Code? Open in Web Editor NEWClumped isotope data analysis in R
Home Page: http://clumpedr.isoverse.org/
License: GNU General Public License v3.0
Clumped isotope data analysis in R
Home Page: http://clumpedr.isoverse.org/
License: GNU General Public License v3.0
Error in default(quiet) : could not find function "default"
Error: unable to load R code in package ‘clumpedr’
I didn' know about matches()
yet, but encountered it in this dplyr issue. I cannot find proper documentation on it though, even though it is mentioned here.
But it may be nice to make the regex more transparent?
Seems like the current notation that I came up with after playing around with markdown's built-in δ^13^C
and Δ~47~
, using \eqn{\delta^{13}}C
only works in pdf output :(.
On this line, I use the quos_to_text
function from isoreader
Line 11 in 3de2836
Line 5 in 4131713
In the newest version, this has all been cleaned up with new rlang calls. Maybe I can get rid of my whole nse.R file (which I just copied from isoreader anyway) and import functions from isoreader that are the same from settings.R, and overwrite the functions where I'd like to use default globals specific to clumpedr.
https://github.com/isoverse/isoreader/blob/7b6ceee31aff9fbe7a480c41b3353012465f5cf1/R/settings.R#L32
Maybe I can steal some of the configs from isoprocessor, but it looks like it also hasn't been updated to the newest syntax yet.
https://github.com/isoverse/isoprocessor/blob/master/R/settings.R
Right now the basic documentation is almost there, but probably it's better to have a few example calls for each function.
Sometimes I'd like to show the values of a vector in an info message, like here:
clumpedr/R/spread_intensities.R
Line 30 in 87810f1
However, pasting it together with the rest of the message repeats the character part every time. @sebkopf any idea how to get something like this:
library(dplyr)
library(glue)
vars <- c(1, 5, 3, 9)
glue("Info: parameter values are: {vars}") %>%
message()
to print:
"Info:parameter values are: 1, 5, 3, 9"
in stead of repeating the character part?
With in the function clean_did_info() the Line
info is not in our did_files pulled out of isoreader. I bet his has to do with how we have isodat configured. We will need to have error checking or the ability to pass in what types of user info exist for each mass spec.
clumpedr/R/empirical_transfer_function.R
Line 74 in f62cb23
I use dplyr::do
to calculate a lm
within groups, but sometimes a group has too few values, or some NA
values, or something else happens that makes the lm call fail with en error. It would be better if the function would continue calculations with a warning and return _NA_real in stead.
I've had a look at purrr::safely for this, but couldn't get it to work. Any ideas @sebkopf? :)
New clean_did_info function fails when files with problems are present. This is because get_inits first does iso_get_raw_data, which omits the problematic files, and then tries to merge it with a df that includes the problem files.
If dids is a list of iso_files where some of them have problems (no data, because drop fail or something):
dids %>%
clean_did_info("MOTU")
#>Info: mutating file info for 9637 data file(s)
#>Error: Column `s44_init` must be length 9637 (the number of rows) or one, not 9211
This goes away when I:
dids %>%
iso_filter_files_with_problems() %>%
clean_did_info("MOTU")
I see that you use a makefile in the top-level directory with targets for vignette building and unit testing. Why do you not use R CMD check
(for cran: R CMD check --as-cran
). https://cran.r-project.org/doc/manuals/r-release/R-exts.html
The build checks keep complaining that quiet
and genplot
arguments in various functions are currently undocumented. I don't know how to exclude them from the checks. Should I write their documentation somewhere, and have all the functions that use them @inheritParams
from that definition? @sebkopf a little help? :)
This function currently parses some of the metadata using readr. I think Brett's code probably does this better here.
Brett's code also unnests the metadata in the nested measurement_info
column, which would be nice if they are always of the same type for the 253+.
I was considering that it may be smart to get rid of all the functions that I don't use a lot before this (hopefully) starts getting used by other people, so there will be less code to maintain and the package will be more focussed on functionality in stead of feature overload. What do you think, @sebkopf?
Presently, delta_values takes two arguments for d13C and d18O. These should be plucked out of the mass spec data that's already in the file.
The current vignette only shows the idea of the workflow, but doesn't include example data and doesn't illustrate some of the plotting functions and steps along the way.
collapse_cycles already captures some columns, but I think Brett's code calculates it for all relevant columns.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.