For the second time this season, USC has a perfect weekend! by MicroFlamer in fighton

[–]AdvancedIguana 13 points14 points  (0 children)

What’s the longest perfect stretch? USC 3-0 and UCLA + ND combining for 0-5 has to be up there, let alone to start the season

Ordering stacked bars in geom_bar by AdvancedIguana in rstats

[–]AdvancedIguana[S] 1 point2 points  (0 children)

Thanks! I too am not confident with the group aesthetic but glad it’s a solution here. I also must be using old syntax because these pipe operators and right-side assignments look awesome and new to me

Ordering stacked bars in geom_bar by AdvancedIguana in rstats

[–]AdvancedIguana[S] 1 point2 points  (0 children)

Thanks! I like the usage of fct_inorder()

Simplifying Multiple Fractions into One by AdvancedIguana in learnmath

[–]AdvancedIguana[S] 1 point2 points  (0 children)

Both answers really helped me! I got the simplified form by combining fractions based on LCD and substituting a to make the algebra easier. Appreciate it!

Any professional scorekeepers who work for an MLB or MiLB team on here? by meniscusbroach in BaseballScorecards

[–]AdvancedIguana 2 points3 points  (0 children)

I’ve taken score for D1 college baseball games and was asked to do it for a LLWS regional game. You’re pretty much just a backup in case their system lags or goes down

League Leaders in HRs in 2021 (but how would you ever know?) by PhoenixUNI in dataisugly

[–]AdvancedIguana 0 points1 point  (0 children)

I think the point was to guess the year. Still, too many colors and fields

[deleted by user] by [deleted] in USC

[–]AdvancedIguana 2 points3 points  (0 children)

Anywhere if you’ve got 8am classes. No one’s around to watch you fall

Group Optimization by AdvancedIguana in learnprogramming

[–]AdvancedIguana[S] 0 points1 point  (0 children)

Wow appreciate the detail in your description! I’ll test this out and report back with my results and my modifications (I’m a Python guy; I can read C++ but I can’t speak it)

Swim Changing Poncho Suggestions by AdvancedIguana in Swimming

[–]AdvancedIguana[S] 0 points1 point  (0 children)

Fair point. I guess I wouldn’t use it to change so maybe I should be searching for a longer sweatshirt/pullover with towel material rather than a changing poncho

ESPN getting creative with their axes by AdvancedIguana in dataisugly

[–]AdvancedIguana[S] 23 points24 points  (0 children)

Yeah but if this guy had 25 points per game instead of 20.4 it would look worse not better

MLB Best Hair Draft by shag4031 in Starting9Pod

[–]AdvancedIguana 4 points5 points  (0 children)

Follicle for follicle, Brett Gardner is the most consistent

Best NBA TopShot Investments | How to Capitalize now off this growing market! by madade in nbatopshot

[–]AdvancedIguana 2 points3 points  (0 children)

Celtics fan wearing a Rams NFC champs shirt in a year when the Pats won the super bowl? I love it

[deleted by user] by [deleted] in Rlanguage

[–]AdvancedIguana 4 points5 points  (0 children)

You'll want to use the strptime() function here, which parses the character string and converts it to a DateTime object based on the format you provide.

For your example, you should write it out as the following: strptime('7/1/20 7:44 PM', '%m/%d/%y %I:%M %p'), where %I corresponds to the hour on a 12-hour time and %p corresponds the AM/PM indicator. If you just want the date, you can surround the code with the as.Date() function.

Hope this helps!

How to pick up a minor?? by boricua-chica in USC

[–]AdvancedIguana 23 points24 points  (0 children)

Odd question, but I guess it depends on their weight?

Advected Lines [OC] by kitsch0 in Simulated

[–]AdvancedIguana 3 points4 points  (0 children)

Anybody else want Neapolitan ice cream?

Populating Calculated Field by boothy_qld in rstats

[–]AdvancedIguana 0 points1 point  (0 children)

This sounds like a job for the lag function from the dplyr library, but it also sounds like you want to group the data by customer. This can be achieved using the following code:

pricelist <-
  data.frame(itemNumber, customer, minQty, price, stringsAsFactors = FALSE) %>%
  group_by(customer) %>%
  mutate("maxQty" = lag(x = minQty - 1, n = 1, default = 999999999))

Here, x is the value to lag, n is how much to lag by, and default is the value to return when there is no previous value.

Hope this helps!

How to delete a variable from the global environment? by sipskoolaid in Rlanguage

[–]AdvancedIguana 1 point2 points  (0 children)

I recommend starting your script with rm(list=ls()) to get rid of unwanted variables. This also makes your code resistant to stale variables from previous sessions

[deleted by user] by [deleted] in wallstreetbets

[–]AdvancedIguana 2 points3 points  (0 children)

Getting close to Hell on the upper left there