I've been using Atom for a few months now. Recently, (after an update, I presume,) it's started showing me something I don't understand despite my best efforts, and it's become quite distracting.
I can't tell what the heck this random green highlighting is trying to tell me.
The green highlighting was removed when I disabled a package called "Refactor", by "hax".
(That could actually be because disabling "Refactor" stopped package "js-refactor" from running, since the latter depends on the former.)
Related
I'm looking for an advice please. After cca 6 months I got back to a code I wrote that by then took around 30 minutes to finish. Now, when I run it's way slower. It looks like it could take days. Since back then, hardware didn't change, I'm using Windows 10 and since then I updated my RStudio to current version (2022.07.2 Build 576), and I didn't update R version, which is "4.1.2 (2021-11-01)".
I noticed that in contrast to before, now RStudio is not using more than around 400MB RAM. Before it was much more. I don't run any other SW and there is plenty RAM available.
I had an idea that antivirus might cause this, even though I didn't change any settings. I put RStudio and R to exceptions and didn't change anything.
I also updated RStudio from the previous version, which didn't help.
Please, does anyone have an idea what can be causing this? Sorry if the description is not optimal, it's my first post here and I'm not a programmer, I just use R for data analysis for my biology related diploma thesis.
Thanks a lot!
Daniel
As I was writing up this question, I tricked myself into finding the (now fairly obvious) solution. However, since it caused me a lot of confusion, I figured I would leave this up to save other people time. I can't write my own answer, so if someone else wants to answer it I will mark it. And no hard feelings if someone wants to mark this as obvious/duplicate/not a question.
Basically, I "couldn't" see the y/n prompt because I wasn't looking at the console (I was doing this in R Notebook for no particular reason), and the function was endlessly waiting for me to respond. After I figured this out, font_import() finished after 5 minutes. Hope this is helpful to someone.
Here is my question:
I'm trying to set up the extrafont package in R so I can use Times New Roman in ggplot. I am using this as a reference: How to change font of ggplot into Times New Roman (on OS X)?
Here is what I have tried:
library()
#font_import()
#font_import(pattern = "TIMES")
font_import(paths="C:\\Windows\\Fonts")
I let the first one run for 5 hours last night, and I tried the other ones this morning to maybe keep it from doing unnecessary work. None of them finished. However, I think something is going wrong for two reasons: 1) I don't get the prompt shown here: https://rdrr.io/cran/extrafont/man/font_import.html, and 2) my CPU and RAM utilization don't indicate that my computer is actually working on anything that should take some time.
The font_import function gives a prompt on the console that needs to be answered with y or n. Hence, it was waiting for a response, and nothing happened.
(Posting answer since OP cannot post themselves.)
FYI, I had a similar issue (newbie to R), until I figured out that there was a prompt in the console.
If you wanna avoid having to wait to answer in the console every time, set
prompt=FALSE
https://www.rdocumentation.org/packages/extrafont/versions/0.18/topics/font_import
When viewing dataframes in the "Source" section of RStudio, the columns are frequently misaligned, making it difficult to read.
I'm not sure what is causing this, and playing around with the width of the columns doesn't seem to help. I've looked at the "known issue" of column misalignment, but as far as I could tell, it seemed to be a different error. I'm not sure if this is due to something in my settings, but nothing there seems to apply, and restarting RStudio doesn't do anything either.
This happens when clicking on the object in the Data section of the environment, which prints:
View(cps_tiers
At this point, the dataframe loads fine, but the columns are hard to read. Here is an image of what I'm describing:
Calum You was correct, I updated RStudio and the issue seems to have gone away. Thanks for the help!
I'm trying to create a wordcloud using R in Eclipse. I've been working with R for some weeks without any problem and I´ve created lots of different plots, but when creating the wordcloud, any kind of them and using different configurations, I always get the wordcloud with all the words overlapped.
I've followed different examples and I always get the words overlapped. For example, if I execute this code:
library(wordcloud)
library(tm)
wordcloud("May our children and our children's children to a
thousand generations, continue to enjoy the benefits conferred
upon us by a united country, and have cause yet to rejoice under
those glorious institutions bequeathed us by Washington and his
compeers.",colors=brewer.pal(6,"Dark2"),random.order=FALSE)
I get this result:
As you can see, all the words are overlapped and I don´t know what to do. I've search a lot on the Internet and I didn't get any clue.
The arguments within the wordcloud package includes:
"use.r.layout - if false, then c++ code is used for collision detection, otherwise R is used"
-Documentation for Wordcloud package.
There may be some difficulty with Eclipse and the usage of R vs. C++. As I am unsure as to the default of Wordcloud try toggling the argument between TRUE and FALSE.
e.g. Wordcloud("Corpus",use.r.layout=TRUE,colors=brewer.pal(6,"Dark2"),random.order=FALSE)
I got this problem after adding the command
Sys.setlocale('LC_ALL','C')
Disabling this directive made wordclouds work fine again.
I am using Jupyter Notebook with R kernel
colorout is no longer on CRAN. As #user2647661 points out below, the package is still being maintained and can be downloaded from the author's website.
My question: Is there another R package that provides similar functionality or at least a quick hack that shows errors in red? (I use R inside a Gnome Terminal on Ubuntu.)
I am aware of Alex's question about printing errors in red. #Eric Fail's answer suggests that something like this can be build using error handling functions. However, I am not familiar enough with R to fully understand his suggestion. Has anybody implemented something like this yet?
The package is no longer on CRAN but it's still being maintained. Please, look at http://www.lepem.ufc.br/jaa/colorout.html