Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using R Programming !!! a

Using R Programming !!!

a<-tibble(id = sample(1:100, 20))

Please use R programming to pick a random 20 from 100 IDs and use the "mutate" function in another column as treatment as YES and NO.

10 IDs are under Yes and the remaining 10 IDs are under No

You can use the if-else statement. The example should be like this:-

ID Treatment
34 Yes
56 Yes
21 No
10 Yes
67 No

and so on till 20 rows.

Please show the R code!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

Using R Programming !!! a

Answered: 1 week ago

Question

Ensure continued excellence in people management.

Answered: 1 week ago

Question

Enhance the international team by recruiting the best people.

Answered: 1 week ago