Closed western11 closed 2 years ago
I can't reproduce this, so it has to be something specific to your Sheet and your usage.
library(googlesheets4)
dat <- data.frame(x = 1.1, y = 2.2)
ss <- gs4_create("sheet-append-reprex", sheets = list(dat = dat))
#> ✓ Creating new Sheet: "sheet-append-reprex".
read_sheet(ss)
#> ✓ Reading from "sheet-append-reprex".
#> ✓ Range 'dat'.
#> # A tibble: 1 x 2
#> x y
#> <dbl> <dbl>
#> 1 1.1 2.2
dat2 <- data.frame(x = 3.3, y = 4.4)
ss %>%
sheet_append(dat2)
#> ✓ Writing to "sheet-append-reprex".
#> ✓ Appending 1 row to 'dat'.
read_sheet(ss)
#> ✓ Reading from "sheet-append-reprex".
#> ✓ Range 'dat'.
#> # A tibble: 2 x 2
#> x y
#> <dbl> <dbl>
#> 1 1.1 2.2
#> 2 3.3 4.4
Created on 2021-08-05 by the reprex package (v2.0.1.9000)
This conversation seem to have gone quiet.
Hey, thanks for this amazing package, I have used it for quite a while and make my works much simpler. kudos for that.
I have a task to migrate an old shiny that using googlesheets package into googlesheets4 and I have a problem with
sheet_append()
function. There is no problem with the function but the produced output for numeric value using comma ( , ) as the decimal separator. Since the problem in the output and both code and sheet are confidential, I can't give you the screenshot but it's actually pretty straightforward to understand.Below is the table example in my sheet. first row are numbers produces by old googlesheet package with gs_add_row function. the second row are numbers produces with sheet_append() function
About the code, I'm trying to export confusion matrix results into dataframe, where
confMatScotClass()
is a reactive value from shiny. You can just imagine that it's just a confusion matrix saved into a variable. The code below works fine in R where the value are detected as numeric but the problem just occur when appended into sheet like table aboveIt will be better if you guys can change the separator as ( . ) or maybe create a new optional parameter in the sheet_append() function where user can use either . or , as the separator.