---
title: "Calc Problem in 001-init.R"
url: "https://openforis.support/questions/3646/calc-problem-in-001-initr"
tags: ["calc"]
status: "accepted"
score: 0
answer_count: 2
asked: "2023-05-02T19:05:56"
last_activity: "2023-05-05T11:50:47"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2021. Some rights reserved under creative commons license."
---

# Calc Problem in 001-init.R

Asked by wexxo on 2023-05-02

Hi,

after some time, I needed Calc to run again. While the scripts seem to be working in R Studio, as soon as I press the "play" button in calculations to load them into Calc, I receive the following error message indicating that my CRAN mirror is not defined(?):

*Error in 'R Scripts - Processing chain' 
 2023-05-02 18:58:46     step : 1-init.R
INFO: Processing chain started 
2023-05-02 18:58:46     step : -
ERROR: Error in contrib.url(repos, "source"): trying to use CRAN without setting a mirror
 
Error in dbDisconnect(connection) : 
  could not find function "dbDisconnect"
Calls: source ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted*


I have tried to alter the Rprofile and Rprofile.site files in ..opt\R\R-4.1.1\library\base\R and ..opt\R\R-4.1.1\etc, respectively. Unfortunately to no avail.

Any pointing in the right direction would be highly appreciated!

Thanks in advance!
Alex


## Accepted answer (score 0, by wexxo on 2023-05-05)

Link: https://openforis.support/questions/3646/calc-problem-in-001-initr/3649

Hi OF Team,

I updated R in C:\opt\R\R-4.3.0 (from ver. 4.1.1). Now the scripts are being processed fine in Calc, so the problem is solved!

Thanks a lot for the hint and support!!

Best regards,
Alex


## Answer (score 1, by Stefano (OF) on 2023-05-04)

Link: https://openforis.support/questions/3646/calc-problem-in-001-initr/3647

Dear Alex,  
We will contact you to you private email, so you can share with us your Calc workspace and we can better understand your issue.  
Many thanks,  
Open Foris Team
