Skip to content

Drop rows and columns#180

Merged
pburnsdata merged 6 commits intodev-v0.8.0from
drop-rows-columns
Feb 15, 2019
Merged

Drop rows and columns#180
pburnsdata merged 6 commits intodev-v0.8.0from
drop-rows-columns

Conversation

@pburnsdata
Copy link
Copy Markdown
Contributor

Issues

#19

R/trimData.R Outdated
if (!is.null(settings[['analysisFlag']][['value_col']])) {
data_subset %<>%
filter_at(settings[['analysisFlag']][['value_col']], all_vars(. %in% settings[['analysisFlag']][['values']]))
}
Copy link
Copy Markdown
Contributor

@bzkrouse bzkrouse Feb 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe for the baseline values part, we don't necessarily want to restrict to ONLY baseline values. We just want to make sure they are included. So I think we want to filter on baseline flag OR analysis value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. something like:

data_subset %<>% 
mutate(isBaseline = settings[['baseline']][['value_col']] %in% settings[['baseline']][["values]]) %>%
mutate(isAnly = settings[['analysisFlag']][['value_col']] %in% settings[['analysisFlag']][["values]]) %>%
filter(isBaseline || isAnly)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might need to throw some ifelse(is.null()) logic in those mutates too.

dataUpload <- function(input, output, session){

ns <- session$ns
maxFileSize <- 20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we'd handle this in safetyGraphicsApp(). That we could make maxFileSize a new option that the user can configure for a given session.

R/trimData.R Outdated

trimData <- function(data, settings){

#remove columns not in settings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done!

@pburnsdata pburnsdata changed the title Drop rows columns Drop rows and columns Feb 15, 2019
@pburnsdata pburnsdata merged commit c738487 into dev-v0.8.0 Feb 15, 2019
@pburnsdata pburnsdata deleted the drop-rows-columns branch February 15, 2019 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants