File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ def r_version(self):
7575 "3.6" : "3.6.1-3bionic" ,
7676 "3.6.0" : "3.6.0-2bionic" ,
7777 "3.6.1" : "3.6.1-3bionic" ,
78+ "4.0" : "4.0.2-1.1804.0" ,
79+ "4.0.2" : "4.0.2-1.1804.0" ,
7880 }
7981 # the default if nothing is specified
8082 r_version = "3.6"
@@ -232,13 +234,17 @@ def get_build_scripts(self):
232234
233235 scripts = []
234236 # For R 3.4 we want to use the default Ubuntu package but otherwise
235- # we use the packages from a PPA
237+ # we use the packages from R's own repo
236238 if V (self .r_version ) >= V ("3.5" ):
239+ if V (self .r_version ) >= V ("4" ):
240+ vs = "40"
241+ else :
242+ vs = "35"
237243 scripts += [
238244 (
239245 "root" ,
240- r """
241- echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35 /" > /etc/apt/sources.list.d/r3.6 -ubuntu.list
246+ rf """
247+ echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran { vs } /" > /etc/apt/sources.list.d/r -ubuntu.list
242248 """ ,
243249 ),
244250 # Use port 80 to talk to the keyserver to increase the chances
Original file line number Diff line number Diff line change 1+ install.packages(" ggplot2" )
Original file line number Diff line number Diff line change 1+ r-4.0-2020-07-07
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env Rscript
2+ library(' ggplot2' )
3+
4+ print(version )
5+ if (version $ major != " 4" ) {
6+ quit(" yes" , 1 )
7+ }
You can’t perform that action at this time.
0 commit comments