mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
experiments with teal. usage examples are sparse
This commit is contained in:
parent
0c9c5d33a6
commit
a5c0a01d8a
14 changed files with 840 additions and 15 deletions
24
R/helpers.R
24
R/helpers.R
|
|
@ -126,3 +126,27 @@ dummy_Imports <- function() {
|
|||
)
|
||||
#https://github.com/hadley/r-pkgs/issues/828
|
||||
}
|
||||
|
||||
|
||||
file_export <- function(data,output.format=c("df","teal"),filename){
|
||||
output.format <- match.arg(output.format)
|
||||
|
||||
filename <- gsub("-","_",filename)
|
||||
|
||||
if (output.format=="teal"){
|
||||
out <- within(
|
||||
teal_data(),
|
||||
{
|
||||
assign(name, value |> dplyr::bind_cols())
|
||||
},
|
||||
value = data,
|
||||
name = filename
|
||||
)
|
||||
|
||||
datanames(out) <- filename
|
||||
} else if (output.format=="df"){
|
||||
out <- data
|
||||
}
|
||||
|
||||
out
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue