Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ dependencies = [
"openalea.plantgl",
"openalea.caribu",
"openalea.astk",
"rpy2"
"rpy2",
"r-recommended"
]
[tool.setuptools.dynamic]
readme = {file = ["README.md"]}
Expand Down
2 changes: 2 additions & 0 deletions src/openalea/adel/AdelR.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
# Set Numeric Locale value
r('Sys.setlocale(category="LC_NUMERIC",locale="C")')

# Load stats on Windows
robj.r('library(stats)')

def get_rcode(file_name):
with open(os.path.join(dir, file_name), "r") as content_file:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
from pathlib import Path

def select_Maxwell_2011_d220_N1_laminaCurv_date(in1):
'''
'''
if in1 == 'Date_1':
out1 = 271
out2 ='c:\\openaleapkg\\adel\\adel\\data\Maxwell_2011_d220_N1_laminaCurv_date1.RData'
elif in1 == 'Date_2':
out1 = 466
out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date2.RData'
elif in1 == 'Date_3':
out1 = 637
out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date3.RData'
elif in1 == 'Date_4':
out1 = 922
out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date4.RData'
elif in1 == 'Date_5':
out1 = 1125
out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date5.RData'
elif in1 == 'Date_6':
out1 = 1428
out2 ='c:\\openaleapkg\\adel\\adel\\data\\Maxwell_2011_d220_N1_laminaCurv_date6.RData'
else:
out1 = 0
out2 ='ERREUR'
mydir = Path(__file__).parent.absolute()

if in1 == 'Date_1':
out1 = 271
out2 = str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date1.RData')
elif in1 == 'Date_2':
out1 = 466
out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date2.RData')

elif in1 == 'Date_3':
out1 = 637
out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date3.RData')

elif in1 == 'Date_4':
out1 = 922
out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date4.RData')

elif in1 == 'Date_5':
out1 = 1125
out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date5.RData')

elif in1 == 'Date_6':
out1 = 1428
out2 =str(mydir/'Maxwell_2011_d220_N1_laminaCurv_date6.RData')

else:

out1 = 0
out2 ='ERROR'

return out1, out2,
Loading