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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.