mirror of
https://github.com/msberends/AMR.git
synced 2025-07-11 15:01:53 +02:00
new tibble export
This commit is contained in:
21
man/join.Rd
21
man/join.Rd
@ -47,21 +47,22 @@ If the \code{dplyr} package is installed, their join functions will be used. Oth
|
||||
left_join_microorganisms(as.mo("K. pneumoniae"))
|
||||
left_join_microorganisms("B_KLBSL_PNMN")
|
||||
|
||||
df <- data.frame(date = seq(from = as.Date("2018-01-01"),
|
||||
to = as.Date("2018-01-07"),
|
||||
by = 1),
|
||||
bacteria = as.mo(c("S. aureus", "MRSA", "MSSA", "STAAUR",
|
||||
"E. coli", "E. coli", "E. coli")),
|
||||
stringsAsFactors = FALSE)
|
||||
colnames(df)
|
||||
|
||||
df_joined <- left_join_microorganisms(df, "bacteria")
|
||||
colnames(df_joined)
|
||||
|
||||
\donttest{
|
||||
if (require("dplyr")) {
|
||||
example_isolates \%>\%
|
||||
left_join_microorganisms() \%>\%
|
||||
colnames()
|
||||
|
||||
df <- data.frame(date = seq(from = as.Date("2018-01-01"),
|
||||
to = as.Date("2018-01-07"),
|
||||
by = 1),
|
||||
bacteria = as.mo(c("S. aureus", "MRSA", "MSSA", "STAAUR",
|
||||
"E. coli", "E. coli", "E. coli")),
|
||||
stringsAsFactors = FALSE)
|
||||
colnames(df)
|
||||
df_joined <- left_join_microorganisms(df, "bacteria")
|
||||
colnames(df_joined)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user