Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
The following error appears when running R script in powerbi but not in RStudio, please help.
My R version is 3.3.1
DataSource.Error: ADO.NET: R script error.
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Error in check_input(x) :
Input must be a character vector of any length or a list of character
vectors, each of which has a length of 1.
Calls: %>% ... unnest_tokens -> unnest_tokens_ -> tokenfunc -> tf -> check_input
Execution halted
Details:
DataSourceKind=R
DataSourcePath=R
Message=R script error.
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Error in check_input(x) :
Input must be a character vector of any length or a list of character
vectors, each of which has a length of 1.
Calls: %>% ... unnest_tokens -> unnest_tokens_ -> tokenfunc -> tf -> check_input
Execution halted
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Radio.RScriptRuntimeException
Did you ever find a solution? Having same issue...
yeah - for some reason, PowerBi takes character column as factor rather than character so I need to cast the column to as.character(dataset$column1) then it worked.
You may need to transform the column and apply Clean so it gets rid of whitespace etc...
Let me know if that works for you.
@Anonymous Have you got the package you're using in your script intalled. If the package is installed then you need to load that package in your script ie use library(packagename) at start of the script.
Any chance you can share some sample data and your R script so that we can try to replicate?
I think the problem is this bit below Im not sure why tho.
Error in check_input(x) :
Input must be a character vector of any length or a list of character
vectors, each of which has a length of 1.
Calls: %>% ... unnest_tokens -> unnest_tokens_ -> tokenfunc -> tf -> check_input
ADDITIONAL INFO
Tried the same script as data source and it works perfectly! Just not as a Transform step within the query 😞
Hi Pedzila,
What is your current situation?
Could you please share about the R scripts that you used here?
We will try to reproduce the error and see if we could find any helpful information with the scripts.
I suspect it would work as the data source and not a transform step, should be caused by some functions used in the R scripts.
Regards
Hi
THanks for replying
R script below
# 'dataset' holds the input data for this script
library(tidytext)
library(dplyr)
title_words <- dataset %>%
select(text) %>%
unnest_tokens(Word, text)
Data (one column called text)
text
#AttributeOwnership is exactly why @apple will always be #one! #apple #marketing #marketer #business #innovation #fb
Can't wait to get my #Iphone5S!!! @apple
Swapped my #galaxys2 for an #iPhone4S. After one day I'd say I'm an @apple convert!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |