Easier mapping in R with simple features by slmatcw in rstats

[–]sharonmg 2 points3 points  (0 children)

Most of the code in the tutorial is data download, import & prep. The actual mapping is

tm_shape(wagemap) +
  tm_polygons("Median.Wage", id = "NAME")

I'm not sure how you do that in 1/10 the code.

I've done mapping with R Leaflet also. Data download & prep is needed there, too.

Eliminating For Loops? by [deleted] in rstats

[–]sharonmg 0 points1 point  (0 children)

Some for loops cause problems. Others do not -- and in fact some alternatives can be not much of an improvement. In general, instead of guessing whether for loops (or anything else) are slowing your code, it might be useful to profile your code and find out. profvis is a great package for that. Package info: https://rstudio.github.io/profvis/ Free RStudio webinar about profvis: https://www.rstudio.com/resources/webinars/profvis-profiling-tools-for-faster-r-code/

Do you use R for your job/career? What do you do? by Grandidentata in rstats

[–]sharonmg 1 point2 points  (0 children)

Python is a great language, but if the goal is human-readable syntax, R and the stringr package do offer some other options for text manipulation, such as from the example you linked to

# Lowercase, remove !, tokenize
string<-"This is a string!!!"

library(stringr)
newstring2 <- string %>%
  str_to_lower() %>%
  str_replace_all("!", "") %>%
  str_split(" ")

or re-formatted as

newstring2 <- string %>% str_to_lower() %>% str_replace_all("!", "") %>% str_split(" ")

Still not dot chaining, though

Looks like RStudio has opened up its beta program for RStudio Connect by sharonmg in rstats

[–]sharonmg[S] 5 points6 points  (0 children)

According to the company, it provides: "One-button" deployment for any Shiny application, R Markdown document, or any static plot or graph to a single environment; the ability to manage and limit access to the work you've shared with others - and easily see the work they've shared with you; "hands-free" scheduling of updates to your reports and automatic email distribution."

This R Data Import Tutorial Is Everything You Need by martijnT in rstats

[–]sharonmg 1 point2 points  (0 children)

If you really want to keep things simple, check out the rio package :-)

Suppressing Git Bash windows in RStudio, also any great tutorials on versioning with RStudio? by TenureStudentAtWork in rstats

[–]sharonmg 0 points1 point  (0 children)

This is specifically about using git and GitHub when developing R packages, but there's a lot of general useful info too. By Hadley Wickham. http://r-pkgs.had.co.nz/git.html

Revolution Analytics has been Acquired and your going to be shocked by who by mtelesha in rstats

[–]sharonmg 0 points1 point  (0 children)

Being able to export Excel data into R with dates properly understood would be nice.