Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

R Tool and writing output

dstrat22
5 - Atom

I've been struggling to write some exchange data pulled via tidyquant into alteryx. 

My output keeps returning a single column with no values. The column header corresponds to the name of the tibble from which I converted to a dataframe in the code before attempting to write to alteryx. 

I have double checked in R, that "btcdata" is indeed a data frame
str(btcdata). 

When I run view(btcdata) in R it returns the desired data. 

However, the R tool is not writing the desired data to the output.

Please ignore errors in "as.data.frame"

Screenshot 2025-01-06 162854.png

2 REPLIES 2
dstrat22
5 - Atom

Code:


# Install Packages
library(tidyverse)
library(tidyquant)


#Designate Tickers
tickers <- c("BTC","ETH","DOGE","LINK","LTC","ADA","SOL")

#Pull Data
map(tickers, ~ assign(str_c(str_to_lower(.x), "_data"),
tq_get(str_c(.x, "-USD"), from = "2009-01-03"),
envir = .GlobalEnv))

#Convert to dataframe
btcdata <- as.data.frame(btc_data)
ethdata <- as.data.frame(eth_data)
dogedata <- as.data.frame(doge_data)
linkdata <- as.data.frame(link_data)
ltcdata <- as.data.frame(ltc_data)
adadata <- as.data.frame(ada_data)
soldata <- as.data.frame(sol_data)


#Write to Alteryx
write.Alteryx(btcdata, 1)

apathetichell
20 - Arcturus

Which version of R are you running? Which version of Alteryx? Can you confirm that tidyverse and tidyquant are installed in a path Alteryx is looking for packages?

 

Can you turn off AMP and rerun? What do you see in the R tool when you execute there?

Labels
Top Solution Authors