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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors