profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/eringrand/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

barryclark/jekyll-now 7399

Build a Jekyll blog in minutes, without touching the command line.

sfirke/packagemetrics 128

A Package for Helping You Choose Which Package to Use

eringrand/astropic 9

An R package that connects to the NASA Astronomy Picture of the Day (APOD) API

eringrand/eringrand.github.io 7

Using Jekyll Now theme to start a website

eringrand/RTutorials 3

Setting up some lesson plans and examples to help my coworkers and others learn R.

astronomeralex/aas-gender-talks 1

Exploring the gender distribution in AAS talks

eringrand/algorithmhws 1

code samples from homework assignments

eringrand/Blackjack 1

Simple command line blackjack program for python

eringrand/musicanalysis 1

Working with lastfm data to cluster like artists together based on genre and user plays.

issue commentsfirke/janitor

Using tabyl with index-numbers

It might be from the rlang package? I'm not really sure how to help further since it's not a janitor-related issue, sorry.

You might try posting a question on StackOverflow for help.

Sam

On Thu, Jun 24, 2021, 7:19 PM RachelK1994 ***@***.***> wrote:

Thank you very much for getting back to me @sfirke https://github.com/sfirke! I've tried this but unfortunately I then get the message, " Error in :=(!!varname, value) : could not find function ":="" - is it just the "dplyr" package I need to read in or is there perhaps another package I'm missing (or perhaps I've loaded another redundant package that is causing the issue)? Best,Rachel

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sfirke/janitor/issues/317#issuecomment-868022178, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZYDEBVJD52PSEQUJTDOHTTUO4PFANCNFSM4JRMHA3Q .

gekess

comment created time in 4 hours

issue commentsfirke/janitor

Using tabyl with index-numbers

Thank you very much for getting back to me @sfirke! I've tried this but unfortunately I then get the message, " Error in :=(!!varname, value) : could not find function ":="" - is it just the "dplyr" package I need to read in or is there perhaps another package I'm missing (or perhaps I've loaded another redundant package that is causing the issue)? Best,Rachel

gekess

comment created time in 5 hours

issue commentsfirke/janitor

Using tabyl with index-numbers

I can't say for sure but it looks like := is used in the data.table package, and since you load that package after the tidyverse packages, it's calling the data.table version of that operator. Try not loading data.table and seeing if that fixes your problem.

gekess

comment created time in 9 hours

issue commentsfirke/janitor

Using tabyl with index-numbers

Hi there!

I found this extremely helpful - I essentially replicated the code above for my own dataset (switching the order of variables in the table slightly) and it worked once but since I tried to clean it up slightly, I've repeatedly generated this error:

Error in :=(!!varname, value) : Check that is.data.table(DT) == TRUE. Otherwise, := and :=(...) are defined for use in j, once only and in particular ways. See help(":=").

Any help would be hugely appreciated!

Best, Rachel

library(readxl)
TPRdata <- read_excel("TPR-061121.xlsx")
View(TPRdata)
install.packages("janitor")
install.packages("reshape")
library(ggplot2)
library(lubridate)
library(tidyr)
library(tidyverse)
library(plyr)
library(dplyr)
library(glue)
library(purrr)
library(data.table)
library(reshape)
library(janitor)
Iffunction2 <- function(x) ifelse(x == "NA", "NA",ifelse(x == "-1", "Suppressed", ifelse(is.null(x), "Blank", ifelse(x == "Not Provided", "Not Provided", "Value"))))
TPRdata2 <- mutate_all(TPRdata, Iffunction2)
TPRdata2$state2 <- TPRdata$state
View(TPRdata2)
TPRdata2 %>% 
  pivot_longer(-state2) %>% 
  group_split(name) %>% 
  map(function(x) {
    varname <- x %>% distinct(name) %>% pull(name) 
    
    x %>% 
      rename(!!varname := value) %>% 
      tabyl(state2, !!sym(varname)) %>%
      adorn_percentages("row") %>%
      adorn_pct_formatting(digits = 2) %>%
      adorn_ns()
  })

gekess

comment created time in a day

PR opened rstudio/cheatsheets

stringr draft PDF

Updates to 1.4.0 Changes: -str_starts() and _ends() added -starts/ends/detect/which/subset have a new negate argument -str_remove() and _remove_all() added -str_to_sentence() added -str_squish() added -str_flattens() replaced a str_c() example

+0 -0

0 comment

1 changed file

pr created time in 2 days

PR opened rstudio/cheatsheets

lubridate draft PDF

Updates to 1.7.9 Changes: -added tz() under Get and Set Components -added Sys.timezone() and force_tzs under Time Zones

Very few changes/updates made.

+0 -0

0 comment

1 changed file

pr created time in 2 days

PR opened rstudio/cheatsheets

factors update PDF

Updates to 0.5.1 Major Changes: -added fct_match() and fct_cross() -replaced fct_lump() w/ fct_lump_min/_prop/_n/_lowfreq

Overall few changes, mainly formatting adjustments.

+0 -0

0 comment

1 changed file

pr created time in 2 days

PR opened rstudio/cheatsheets

ggplot2 update PDF

Updated to 3.3.4 Major Changes -coord_flip() replaced by swapping aes mappings under Coordinate Systems -geom_contour_filled() added under Three Variables -binned scales added under Scales -Labels and Legends reformatted to include guide_axis/dealing with overlapping labels

+0 -0

0 comment

1 changed file

pr created time in 2 days

PR opened rstudio/cheatsheets

dplyr update PDF

Current dplyr cheatsheet draft, updated for 1.0.6 Major updates: -added rowwise() under Group Cases -added across() and c_across() under Manipulate Variables -_if/_at/_all functions removed

+0 -0

0 comment

1 changed file

pr created time in 2 days

PR opened barryclark/jekyll-now

my Update _config.yml
+2 -2

0 comment

1 changed file

pr created time in 4 days

PR opened barryclark/jekyll-now

Update _config.yml
+1 -1

0 comment

1 changed file

pr created time in 4 days

PR opened barryclark/jekyll-now

Update _config.yml
+1 -1

0 comment

1 changed file

pr created time in 4 days

PR opened barryclark/jekyll-now

Update 2014-3-3-Hello-World.md
+2 -2

0 comment

1 changed file

pr created time in 4 days

PR opened barryclark/jekyll-now

Update 2014-3-3-Hello-World.md
+2 -2

0 comment

1 changed file

pr created time in 4 days

PublicEvent

issue commentsfirke/janitor

Feature: turn all should-be numeric columns into numeric

Wow I didn't know about that either. I had a custom function that went and checked each column to see if converting caused NAs (ie not all numeric), and only if it doesn't cause them, converts to numeric. type_convert() is much better. Thanks.

sfirke

comment created time in 8 days

issue closedsfirke/janitor

Feature: turn all should-be numeric columns into numeric

I have some data that comes in quite dirty, including as all character columns because there are extra "header" rows that appear periodically in the data. But most of the columns should be numeric.

I clean it up and remove those other-header rows so I have pure data. At this point I want to put the should-be numeric columns back to numerics. Here's what I have, should this be included in janitor? Or generalized somehow? I am looking for input.

# if all values of a character vector are numbers or NA, return it as class numeric
recast_numerics <- function(x){
  if(is.character(x) & !any(is.na(as.numeric(x[!is.na(x)])))){
    as.numeric(x)
  } else {
    x
  }
}

# Usage:
dat %>%
  mutate_all(recast_numerics)

It seems to work for my test case, the only thing I don't like is that it prints a warning when it tries coercing actual character vectors to numeric and that generates NAs.

closed time in 8 days

sfirke

issue commentsfirke/janitor

Feature: turn all should-be numeric columns into numeric

ha it seems to do precisely what I'm looking for. I'd never heard of it, so glad they exposed that function and that you could point me toward it! 🎯

sfirke

comment created time in 8 days

PR closed barryclark/jekyll-now

Feature/addiframe

iframe内のデータ数に合わせてコンテンツ高さを変更するスクリプトをscriptタグ内に追加したら正しく動作した。

+138326 -898

1 comment

84 changed files

IchiroKano

pr closed time in 9 days

pull request commentbarryclark/jekyll-now

Feature/addiframe

Closed

IchiroKano

comment created time in 9 days

PR opened barryclark/jekyll-now

Feature/addiframe

iframe内のデータ数に合わせてコンテンツ高さを変更するスクリプトをscriptタグ内に追加したら正しく動作した。

+138326 -898

0 comment

84 changed files

pr created time in 9 days

PR closed barryclark/jekyll-now

Sakina comments
+2840 -156

0 comment

49 changed files

sakina0320

pr closed time in 9 days

PR opened barryclark/jekyll-now

Sakina comments
+2840 -156

0 comment

49 changed files

pr created time in 9 days

issue commentsfirke/packagemetrics

problem with mutate

Thanks for reporting this! It appears that now GitHub does not show you the "watchers" count if you're not logged in. So the scraper is only able to get the counts of stars and forks. I've adjusted that code accordingly. If you are able to reinstall packagemetrics from GitHub and re-try, I'd appreciate it. And if I broke anything else or did not solve this, please open another issue.

verajosemanuel

comment created time in 10 days

push eventsfirke/packagemetrics

Sam Firke

commit sha fd1774ad39d424117e9c0fc108310baa66b629c2

fix #59 - GitHub appears to no longer list watcher counts if not logged in

view details

push time in 10 days

issue closedsfirke/packagemetrics

problem with mutate

packages_list <- c("renv","packagemetrics")
packagemetrics::package_list_metrics(packages_list)

Error: Problem with `mutate()` input `action`.
x Input `action` can't be recycled to size 2.
i Input `action` is `c("watchers", "stars", "forks")`.
i Input `action` must be size 2 or 1, not 3.

closed time in 10 days

verajosemanuel

issue openedrstudio/cheatsheets

loop 0 is not valid: Edge XXX has duplicate vertex with edge YYY

Hi Edzer,

First of all, thank you so much for your incredible work.

I was doing some analysis using a school attendance zone shapefile. With version 0.9.8 I could do st_join between a set of geolocations and the shapefile. Then, I updated the SF package, and now I can't. The error I get is:

"loop 0 is not valid: Edge XXX has duplicate vertex with edge YYY" (Where XXX and YYY are numbers like 1 and 262)

The error clearly suggests this is due to some superimposed polygons in the US attendance shapefiles I'm using. In some areas, you can be assigned to multiple schools. In the shapefiles, instead of having multiple school code columns associated with a specific area, the authors used one school-code column in duplicated zones. Hence, in a zone where you can go to two schools, you will have the same area duplicated twice with two different values in the school code column.

I'm not sure why having a duplicated vertex is problematic. The st_join from the previous version looked reasonable. It would be very nice, if there was an explanation about this error on the st_join vignette from the newest versions explaining what can we do about this and why was it not a problem in previous versions and now it is.

In case you are interested in the details:

  • In this link is the original shapefile from the US gov.
  • I was using az <- sf::st_read("ACS0610_DP02.shp")
  • Then, az <- st_transform(az, crs = 4326)

Then doing st_join with any point and az, will lead to an error if the version is later than 0.9.8

Thank you so much!

created time in 12 days

startedn2cholas/awesome-jax

started time in 13 days

release d3/d3

v7.0.0

released time in 13 days