Browse Source

n() in mutate doesn't need the namespace

master
Maxime Wack 6 years ago
parent
commit
9f3102a07f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      R/demodata.R

+ 1
- 1
R/demodata.R View File

@@ -398,7 +398,7 @@ add_observations <- function(observations, project, host = "", admin = "", pass
update_date = format(Sys.Date(), "%m/%d/%Y"),
text_search_index = seq(nextval+1, length.out = nrow(.))) %>%
dplyr::group_by(patient_ide, encounter_ide, start_date, provider_id, concept_cd, modifier_cd) %>%
dplyr::mutate(instance_num = seq(1, length.out = dplyr::n())) %>%
dplyr::mutate(instance_num = seq(1, length.out = n())) %>%
dplyr::ungroup() %>%
dplyr::select(-patient_ide, -encounter_ide) %>%
dbUpsert(demodata, "observation_fact", c("patient_num", "concept_cd", "modifier_cd", "start_date", "encounter_num", "instance_num", "provider_id"))


Loading…
Cancel
Save