Error: 1:1: unexpected '[' 1: [ on restart of r and same error when installing packages

New behavior with my hosted rstudio instance. Whenever I restart r under session > restart r I get error message:

Error: 1:1: unexpected '['
1: [

I initially ignored this earlier but noticed that it seems to cause a problem when attempting to install packages:

install.packages("hrbrthemes")
Installing package into ‘/home/rstudio-doug/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘systemfonts’, ‘gdtools’

trying URL 'http://cran.rstudio.com/src/contrib/systemfonts_1.0.1.tar.gz'
Content type 'application/x-gzip' length 80368 bytes (78 KB)
==================================================
downloaded 78 KB

trying URL 'http://cran.rstudio.com/src/contrib/gdtools_0.2.3.tar.gz'
Content type 'application/x-gzip' length 33202 bytes (32 KB)
==================================================
downloaded 32 KB

trying URL 'http://cran.rstudio.com/src/contrib/hrbrthemes_0.8.0.tar.gz'
Content type 'application/x-gzip' length 2379836 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

Error: 1:1: unexpected '['
1: [
    ^
Execution halted
Warning in install.packages :
  installation of package ‘systemfonts’ had non-zero exit status
Error: 1:1: unexpected '['
1: [
    ^
Execution halted
Warning in install.packages :
  installation of package ‘gdtools’ had non-zero exit status
Error: 1:1: unexpected '['
1: [
    ^
Execution halted
Warning in install.packages :
  installation of package ‘hrbrthemes’ had non-zero exit status

What could be causing this and how can I overcome it?

Do you have startup files (i.e. Rprofile.site or .Rprofile files)?

Yes, and I've recently been editing it. But I tried removing it by renaming it and still got the error :confused:

.Renviron currently looks like:

# aws
AWS_ACCESS_KEY_ID="my kei id here"
AWS_SECRET_ACCESS_KEY="my key here"
AWS_REGION="us-east-1"
AWS_ATHENA_S3_STAGING_DIR="s3://blahblahathena/results/"

# snowflake
SNOWSQL_PRIVATE_KEY_PASSPHRASE='somepassphrase!'

and besides .Renviron, maybe an .Rprofile ?

1 Like

Bingo! D'oh, I feel silly today. Thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.