Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
StatsChick
Frequent Visitor

Connect to R: Error Message -- Error: Object "Data.R" not Found

I have followed some posts on fixing this issue, including adding a .libpaths() command to the R script. I get the same error -- not only complaining of the memory limit issue but also "Data.R" not found. See my script below. Is there a better way to fix this?

 

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

#dataset <- data.frame(DonorID, Gift_Amount, Gift_Date)
# dataset <- unique(dataset)

# Paste or type your script code here:
library(tidytext)
library(data.table)
library(rfm)
library("stringr", lib.loc="C:/Program Files/R/R-4.3.1/library")


.libPaths("C:/Program Files/R/R-4.3.1/library")


giftData<-data.frame(DonorID, Gift_Amount, Gift_Date)

giftData$giftDate<-as.Date(giftData$date, "%m/%d/%Y")
analysis_date<-as.Date("2023-11-12")
giftData$RecencyDays<-as.numeric(analysis_date-giftData$giftDate)

RFMData<-giftData[which(!is.na(giftData$Pledged)),]
RFMData<-RFMData[which(RFMData$RecencyDays>0),]

rfm_score<-rfm_table_order(RFMData, Prospect.ID, giftDate, Pledged, analysis_date,5,5,5 )

View(rfm_score)
 
 
2 REPLIES 2
Anonymous
Not applicable

Hi @StatsChick ,

Check the object name: Ensure that the object is correctly named in your script. Data.R is case-sensitive, so make sure the case matches.
How To Fix R Error object not found r
How to fix the R Error: object not found (object name reference errors)

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

My script does not refer to Data.R. 

Is there someone in this community who has successfully fixed this issue?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors