- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error connecting Through R
I am getting the following error when I paste the following code in the R script connector box. It is simple script that runs on RStudio.
df1 <- data_frame(school = c("A", "B", "C", "D", "E", "F", "G", "H"), perc_25 = c(950, 1140, 1140, 820, 920, 950, 850, 850), perc_75 = c(1190, 1410, 1380, 1030, 1130, 1150, 1060, 1050), diff = as.numeric(perc_75 - perc_25))
Details: "ADO.NET: R script error.
Error: could not find function "data_frame"
Execution halted
Does nayone have any ideas why this not running. I have done some visual in powerBI using R previously but I am not sure what has changed. Thanks
"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @arashaga,
Which library does data_frame belong? It could be data dot frame which is data.frame(). As far as I know, I can't call other columns when initiating the data frame. Please try it like below or include the proper library.
# include the proper library which has the data_frame. library(lib) your other codes go here.
school <- c("A", "B", "C", "D", "E", "F", "G", "H") perc_25 <- c(950, 1140, 1140, 820, 920, 950, 850, 850) perc_75 <- c(1190, 1410, 1380, 1030, 1130, 1150, 1060, 1050) diff <- perc_75 - perc_25 df1 <- data.frame(school = school, perc_25 = perc_25, perc_75 = perc_75, diff = diff)
Best Regards,
Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @arashaga,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. Thank you for the solution!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @arashaga,
Which library does data_frame belong? It could be data dot frame which is data.frame(). As far as I know, I can't call other columns when initiating the data frame. Please try it like below or include the proper library.
# include the proper library which has the data_frame. library(lib) your other codes go here.
school <- c("A", "B", "C", "D", "E", "F", "G", "H") perc_25 <- c(950, 1140, 1140, 820, 920, 950, 850, 850) perc_75 <- c(1190, 1410, 1380, 1030, 1130, 1150, 1060, 1050) diff <- perc_75 - perc_25 df1 <- data.frame(school = school, perc_25 = perc_25, perc_75 = perc_75, diff = diff)
Best Regards,
Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
10-27-2024 08:06 PM | |||
10-18-2024 12:51 AM | |||
07-21-2024 04:52 AM | |||
09-26-2024 01:32 PM | |||
10-24-2024 01:07 PM |
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
10 | |
2 | |
2 | |
2 | |
2 |