Comments (9)
Right - that's not a good solution. I'll change it.
from sidora.core.
this_tab <- get_con(tab, con) %>% tibble::as_tibble() %>% dplyr::filter(deleted == "false")
Could also consider defining column types on load to speed up filtering (i.e. not string matching but rather boolean selection)?
from sidora.core.
I implemented this for now. Please test.
Could also consider defining column types on load to speed up filtering (i.e. not string matching but rather boolean selection)?
I think we can not do that on the connection level, but only downstream, but please correct me if I'm wrong.
I suggest to implement a function fix_types
that applies all these transformations (Creatiion_Date -> as.Date, Deleted -> as.logical, etc.) to local/downloaded tables.
from sidora.core.
I implemented this for now. Please test.
Works for e
Could also consider defining column types on load to speed up filtering (i.e. not string matching but rather boolean selection)?
I think we can not do that on the connection level, but only downstream, but please correct me if I'm wrong.
I suggest to implement a function
fix_types
that applies all these transformations (Creatiion_Date -> as.Date, Deleted -> as.logical, etc.) to local/downloaded tables.
Sounds good. Shall I make a list for you for each column accordingly for each table? Is there a good place to put 'data' objects (so to say, rather than functions), in a package?
from sidora.core.
I don't know whether it makes sense to store this as a data object. I hope the column transformations are consistent across all tables? I mean: If the table has a column Creation_Date
then it should be a date object in all cases? Then we could easily cover this in R code, I guess.
R Packages can store data. The usual way to do this is to add a directory data-raw that contains raw .csv tables and a prep script that reads the raw data and calls usethis::use_data
for each object. You can also write function documentation for data object. Don't forget to add the data-raw directory to the .Rbuildignore
from sidora.core.
Sorry, yes, I didn't mean data per se. I meant an internal vector or list. Or would that just go straight into a function, like you did with the tab
vetor in get_con?
Actually, I'll make a PR in a few minutes with the lists showing you what I mean.
from sidora.core.
For the moment I would just put it into the function. Later we can outsource it to data objects. Our package has a very specific purpose, so I don't think we have to care too much about abstraction.
from sidora.core.
Hm ok. Because for example you're already copying your tab vector across multiple functions. Wondering what would happen if a new TAB was added.
from sidora.core.
Done
from sidora.core.
Related Issues (20)
- convert datetime-columns automatically HOT 9
- Automatic lookup of capture probe set and other easy-to-lookup columns HOT 16
- Add analysis_result_string table loading HOT 3
- Request convinence function to provide flat table of non-sequential tables.
- Add input validation checks for all functions HOT 2
- missing data in library.Quantification_post-Indexing_total HOT 15
- Analysis tab format is inconsistent with the other tabs HOT 4
- Allow data-entry updating utility functions? HOT 4
- Convert blank cells to NA for consistency?
- Update documentation clarification and error message for new release.
- Add support for new coredb ID entries HOT 2
- convert_all_ids_to_values() requires con
- Make function to call `TAB_Field_Comment` HOT 1
- Fake columns HOT 2
- Update to support new columns HOT 1
- Standardise logical columns
- List of Release names
- Erroneous entries for library index IDs HOT 10
- Soften unnecessarily strict check for table download HOT 1
- Provided environment not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sidora.core.