Question

The following r code does not work, what is the problem and how is it fixed?...

The following r code does not work, what is the problem and how is it fixed?

Error: This function should not be called directly Call `rlang::last_error()` to see a backtrace

BabynamesDist <- make_babynames_dist()

com_fem <- BabynamesDist %>%
filter(sex == "F") %>%
group_by(name) %>%
summarise(N = n(), est_num_alive = sum(est_alive_today),
q1_age = wtd.quantile(age_today, est_alive_today, probs = 0.25),
median_age = wtd.quantile(age_today, est_alive_today, probs = 0.5),
q3_age = wtd.quantile(age_today, est_alive_today, probs = 0.75)) %>%
arrange(desc(est_num_alive)) %>%
head(25)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

There is a package conflict between dplyr and rlang. You need to try the following and check which one works for you

- reinstall dplyr and tidyverse

or

- install.packages("rlang")

Add a comment
Know the answer?
Add Answer to:
The following r code does not work, what is the problem and how is it fixed?...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Data manipulation using R Download and load Most_popular_baby_name.csv to R using the following R code: library('tidyverse')...

    Data manipulation using R Download and load Most_popular_baby_name.csv to R using the following R code: library('tidyverse') baby_names <- read_csv("http://personal.stevens.edu/~fmai/data/Most_Popular_Baby_Names.csv") The file contains the counts of baby names by sex and mother's ethnicity in NYC in 2011-2014. For example, the first record indicates that in 2011, when the mother is Hispanic and the baby is female, 13 were named GERALDINE. BRTH_YR Gender ETHCTY Name Count 2011 FEMALE HISPANIC GERALDINE 13 Only analyze the dataset for the years 2012 - 2014, so...

  • 7. This problem will us R. The following code will simulate flipping a coin 100 times....

    7. This problem will us R. The following code will simulate flipping a coin 100 times. n 100 space <-c("H","T") p c0.5,0.5) observationample (space, size-n, prob-p, replace-TRUE) р.hat <-sum (observation.. "Н")/n р.hat (a) Run the code 5 times, and report the proportion of times a head showed up for each time you ran the code. Label them .aP.P (b) Now change n to 10000, n-10000. Run the code 5 times, and report the proportion of times a head showed up...

  • MATLAB Code Question alpha = 2.3 beta = 4.3 zeta = 9.1 PROBLEM 4 (20 points). Consider three sinusoids with the following amplitudes and phases a.cs(2n(500t)) β.cos(2n(500t) +0.5r) x1n] x2[n] rn...

    MATLAB Code Question alpha = 2.3 beta = 4.3 zeta = 9.1 PROBLEM 4 (20 points). Consider three sinusoids with the following amplitudes and phases a.cs(2n(500t)) β.cos(2n(500t) +0.5r) x1n] x2[n] rn = cos(2(500t)0.75) Create a MATLAB program to sample each sinusoid and generate a sum of three sinusoids, that is using a sampling rate of 8,000 Hz over a range of 0.1 seconds Use the MATLAB function stem) to plot r[n] for the first 20 samples Use the MATLAB function...

  • + Run C Code IMPORTANT: • Run the following code cell to create the input file,...

    + Run C Code IMPORTANT: • Run the following code cell to create the input file, biostats.csv, which you will be using later. 74, In [ ]: N %%file biostats.csv Name, Sex, Age, Alex, M, 41, Bert, M, 42, Dave, M, 39, Elly, F, 30, Fran, F, 33, Jake, M, F, Luke, M, 34, F Myra, M, M, 38, Ruth, F, 28, 22 22 323 47 47, Height, Weight 170 200 167 70 115 143 139 280 98 75, 350...

  • Hi could you please provide how to do problem 2? Amsterdam University of Applied Sciences Problem 2(15 points) A Wheatstone bridge is used to determine the resistance of a strain gauge. The 3 resista...

    Hi could you please provide how to do problem 2? Amsterdam University of Applied Sciences Problem 2(15 points) A Wheatstone bridge is used to determine the resistance of a strain gauge. The 3 resistances R of the Wheatstone bridge are equal: R 200 12. When the strain gauge is fully relaxed (nd strain present), its resistance Rs is equal to the other 3 resistances: Rs-R. The strain is given bywith AR, the change in resistance in the strain gauge. The...

  • Edit a C program based on the surface code(which is after the question's instruction.) that will...

    Edit a C program based on the surface code(which is after the question's instruction.) that will implement a customer waiting list that might be used by a restaurant. Use the base code to finish the project. When people want to be seated in the restaurant, they give their name and group size to the host/hostess and then wait until those in front of them have been seated. The program must use a linked list to implement the queue-like data structure....

  • HERE IS THE CODE I FIXED BUT STILL DOESN'T WORK NOTE: THE VARIABLE x = zeros(size(b))...

    HERE IS THE CODE I FIXED BUT STILL DOESN'T WORK NOTE: THE VARIABLE x = zeros(size(b)) CAN'T BE CHANGED CAUSE HAS BEEN SET BY ASSESSOR HI EXPERTS I NEED HELP TO SOLVE THIS HOMEWORK PROBLEM FOR MATLAB CODE A COUPLE OF TIMES I TRIED LAST TIME TO ASK BUT ALL OF THE ANSWERS WERE WRONG PLEASE KINDLY HELP ME FIND THE RIGHT SOLUTION, ANY HELP WILL BE VERY APPRECIATE Engineering Computations and Modelling > Week 6 Homework > Backward Substitution...

  • LANGUAGE IS C++ Lab Ch14 Recursion In this lab, you are provided with startup code which...

    LANGUAGE IS C++ Lab Ch14 Recursion In this lab, you are provided with startup code which has six working functions that use looping (for, while, or do loops) to repeat the same set of statements multiple times. You will create six equivalent functions that use recursion instead of looping. Although looping and recursion can be interchanged, for many problems, recursion is easier and more elegant. Like loops, recursion must ALWAYS contain a condition; otherwise, you have an infinite recursion (or...

  • I am having a little trouble with my Python3 code today, I am not sure what...

    I am having a little trouble with my Python3 code today, I am not sure what I am doing wrong. Here are the instructions: and here is my code: update: I have seen I did not close x in sumFile and I am still only getting a 2/10 on the grader. any help appreciated. Lab-8 For today's lab you going to write six functions. Each function will perform reading and/or write to a file Note: In zybooks much like on...

  • Please I need help in C language, I am trying to modify the code per the...

    Please I need help in C language, I am trying to modify the code per the below instructions, but I am getting errors. Can't fgure it out. The attempted code modification and data file is privided below, after the instructions. Thank you. Instructions:                  1.      First, add a function named printMsg that displays a message, a greeting, or an introduction to the program for the user. Add a statement that calls that function from the main function when your program starts....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT