Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atom editor r-language error - Failed to load snippets

Tags:

r

atom-editor

Every time I open my Atom editor on my Windows 10 PC I get the following errors. How do I eliminate these errors?

Failed to load snippets from 'C:\Users\stackinator.atom\packages\language-r\snippets\language-r.cson'

C:\Users\stackinator\.atom\packages\language-r\snippets\language-r.cson: Duplicate key 'Cummulative max'
like image 205
stackinator Avatar asked Jul 30 '18 13:07

stackinator


Video Answer


2 Answers

This is caused by a bug in the snippets provided by the language-r package. Since the package has been deprecated by its author, there won't be updates fixing this.

The easiest option is to install atom-language-r instead.

Alternatively, you can edit the snippet to fix that typo. It should look like this:

'Cummulative min':
  'prefix': 'cumi'
  'body': 'cummin(${1:x})'
'Cummulative max':
  'prefix': 'cuma'
  'body': 'cummax(${1:x})'

Note: I have changed the first "Cumulative max" to "Cumulative min".

like image 191
idleberg Avatar answered Nov 14 '22 06:11

idleberg


Apart from changing "Cumulative max" to "Cumulative min", you also might need to remove the first 'Grep' along with its prefix and body since there are 2 'Grep' present

like image 20
Kamaldeep Singh Avatar answered Nov 14 '22 07:11

Kamaldeep Singh