Why is R-Portable running the same code differently than Rstudio?

135 Views Asked by At

I am working on a shiny project that I am going to share using R-portable. Except when I try to run the same code in R-portable rather than RStudio I get a different result. The project mainly uses RSelenium to Webscrape data as shown in the code below. Is this unique to R-Portable and is there a way to make the data not result as a tibble so that the data comes in ungrouped? I have checked and they are both running version 4.03

R-Portable Result

Rstudio Result

The packages I am using and running are Rseleium, Rvest, Stringr, Shiny, Rfast, string, rebus

Thank you so much for all your help.

1

There are 1 best solutions below

0
On

Maybe this example can be useful:

library(tidyverse)

iris[1:10, 1:2]
#>    Sepal.Length Sepal.Width
#> 1           5.1         3.5
#> 2           4.9         3.0
#> 3           4.7         3.2
#> 4           4.6         3.1
#> 5           5.0         3.6
#> 6           5.4         3.9
#> 7           4.6         3.4
#> 8           5.0         3.4
#> 9           4.4         2.9
#> 10          4.9         3.1

#separate each column into a list.
iris[1:10, 1:2] %>% map(~.x)
#> $Sepal.Length
#>  [1] 5.1 4.9 4.7 4.6 5.0 5.4 4.6 5.0 4.4 4.9
#> 
#> $Sepal.Width
#>  [1] 3.5 3.0 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1

Created on 2021-06-06 by the reprex package (v2.0.0)