[ 
https://issues.apache.org/jira/browse/ARROW-16871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Higgins updated ARROW-16871:
----------------------------------
    Description: 
The change log for v8.0.0 notes that functions like exp(), log() and sqrt() can 
be used in R. I have been trying to calculate exp(x) on a field in a dataset, 
but this does not work. I _can_ calculate exp(10) on just some number, and I 
can raise to e manually (2.71828^(x)). Here's some basic reproducible code:
{code:java}
```{r}
test_df <- data.frame(x = c(1, 2, 3, 4, 5), y = c(1, 2, 3, 4, 5))
write_dataset(test_df, "./test_ds")
test_ds <- open_dataset("./test_ds")

# does not work

test_ds %>% mutate(z = exp(x)) %>% collect()

# does work

test_ds %>% mutate(z = 2.71828^(x)) %>% collect()

# also works

test_ds %>% mutate(z = exp(10)) %>% collect()
``` {code}
 

 

  was:
The changeling for v8.0.0 notes that functions like exp(), log() and sqrt() can 
be used in R. I have been trying to calculate exp(x) on a field in a dataset, 
but this does not work. I _can_ calculate exp(10) on just some number, and I 
can raise to e manually (2.71828^(x)). Here's some basic reproducible code:
{code:java}
```{r}
test_df <- data.frame(x = c(1, 2, 3, 4, 5), y = c(1, 2, 3, 4, 5))
write_dataset(test_df, "./test_ds")
test_ds <- open_dataset("./test_ds")

# does not work

test_ds %>% mutate(z = exp(x)) %>% collect()

# does work

test_ds %>% mutate(z = 2.71828^(x)) %>% collect()

# also works

test_ds %>% mutate(z = exp(10)) %>% collect()
``` {code}
 

 


> calculating exp() or sqrt() on dataset field in R does not work
> ---------------------------------------------------------------
>
>                 Key: ARROW-16871
>                 URL: https://issues.apache.org/jira/browse/ARROW-16871
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 8.0.0
>         Environment: Windows 10, R 4.2.0, RStudio 2022.02.3 Build 492
>            Reporter: Chris Higgins
>            Priority: Major
>
> The change log for v8.0.0 notes that functions like exp(), log() and sqrt() 
> can be used in R. I have been trying to calculate exp(x) on a field in a 
> dataset, but this does not work. I _can_ calculate exp(10) on just some 
> number, and I can raise to e manually (2.71828^(x)). Here's some basic 
> reproducible code:
> {code:java}
> ```{r}
> test_df <- data.frame(x = c(1, 2, 3, 4, 5), y = c(1, 2, 3, 4, 5))
> write_dataset(test_df, "./test_ds")
> test_ds <- open_dataset("./test_ds")
> # does not work
> test_ds %>% mutate(z = exp(x)) %>% collect()
> # does work
> test_ds %>% mutate(z = 2.71828^(x)) %>% collect()
> # also works
> test_ds %>% mutate(z = exp(10)) %>% collect()
> ``` {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to