dongjoon-hyun commented on a change in pull request #28419:
URL: https://github.com/apache/spark/pull/28419#discussion_r418208694



##########
File path: dev/lint-r.R
##########
@@ -20,14 +20,13 @@ SPARK_ROOT_DIR <- as.character(argv[1])
 LOCAL_LIB_LOC <- file.path(SPARK_ROOT_DIR, "R", "lib")
 
 # Checks if SparkR is installed in a local directory.
-if (! library(SparkR, lib.loc = LOCAL_LIB_LOC, logical.return = TRUE)) {
+if (!requireNamespace("SparkR", lib.loc = LOCAL_LIB_LOC)) {
   stop("You should install SparkR in a local directory with 
`R/install-dev.sh`.")
 }
 
-# Installs lintr from Github in a local directory.
-# NOTE: The CRAN's version is too old to adapt to our rules.
-if ("lintr" %in% row.names(installed.packages()) == FALSE) {
-  devtools::install_github("jimhester/[email protected]")
+# Installs lintr if needed
+if (!requireNamespace("lintr")) {
+  install.packages('lintr')

Review comment:
       Ya. It looks okay since this seems to install lintr 2.0.1 as of today.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to