Question

## Run the following starter code first. This will load the relevant datasets and libraries. install.packages("car")...

## Run the following starter code first. This will load the relevant datasets and libraries.

install.packages("car")

install.packages("reshape2")

library(car); library(reshape2)

data(Salaries)

library(ggplot2); library(lm.beta)

Question A

  1. How many observations does the dataset salaries contain? __________

QUESTION B

  1. What is the class of the variable, "sex"?

    Integer

    Numeric

    Character

    Factor

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

A) 397

B) d) Factor

Explanation:

df <- Salaries
nrow(df) # finds number of observations
class(df$sex) # tells class of variable


/*Output */

Add a comment
Know the answer?
Add Answer to:
## Run the following starter code first. This will load the relevant datasets and libraries. install.packages("car")...
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
  • On R-studio Run the following starter code first. This will load the relevant datasets and libraries....

    On R-studio Run the following starter code first. This will load the relevant datasets and libraries. install.packages("car") install.packages("reshape2") library(car); library(reshape2) data(Salaries) library(ggplot2); library(lm.beta) Construct a scatter plot with yrs.service on the x-axis, salary on the y-axis,represent rank using color and draw lines through the points. Hint: Lookup up geom_point, geom_smooth at http://docs.ggplot2.org/current/. If you are unable to figure it out, you may run this code. ggplot(data=Salaries,aes(x=yrs.service,y=salary,color=rank)) + geom_point() +  geom_smooth(method="lm",size=1.1,se=F) Now, answer the following questions: A. With years of service, salary...

  • Need this in C The starter code is long, if you know how to do it...

    Need this in C The starter code is long, if you know how to do it in other way please do. Do the best you can please. Here's the starter code: // ----------------------------------------------------------------------- // monsterdb.c // ----------------------------------------------------------------------- #include #include #include // ----------------------------------------------------------------------- // Some defines #define NAME_MAX 64 #define BUFFER_MAX 256 // ----------------------------------------------------------------------- // Structs typedef struct { char name[NAME_MAX]; int hp; int attackPower; int armor; } Character; typedef struct { int size; Character *list; } CharacterContainer; // ----------------------------------------------------------------------- //...

  • The Olympic Summer Games is an international multi-sport event that has been held every four years...

    The Olympic Summer Games is an international multi-sport event that has been held every four years since 1896. Competitors from countries across the world compete against one another, representing their countries, in one or more sports events such as wrestling, rowing, high jump, running races, etc. Events may be separated by the sex of the competitors (male or female) or may be mixed (i.e. males and females competing with each other in the same event). At the end of each...

  • I can't attach the data due to the file being real large i can email it...

    I can't attach the data due to the file being real large i can email it to you so i can have your help on it # Assignment 1 # R Programming Language # ---- Why do Exploratory Data Analysis (EDA)? ---- # We will be looking at ## identifying outliers ## null values ## generating plots ## examining correlations # -------------------------------------------------------------- # In this video we will cover: ## univariate plots for continuous variables (boxlots, historgrams) ## bivariate plots...

  • 1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program!...

    1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program! 3     public static void main(String[] args) { 4         System.out.println("Hello, World!"); 5     } 6 } What is on line 1? a. a variable declaration b. a statement c. a method (subroutine) definition d. a comment e. a class definition 2) Which one of the following does NOT describe an array? a. It can be used in a for-each loop. b. It has a numbered sequence...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

  • The following are screen grabs of the provided files Thanks so much for your help, and have a n...

    The following are screen grabs of the provided files Thanks so much for your help, and have a nice day! My Java Programming Teacher Gave me this for practice before the exam, butI can't get it to work, and I need a working version to discuss with my teacher ASAP, and I would like to sleep at some point before the exam. Please Help TEST QUESTION 5: Tamagotchi For this question, you will write a number of classes that you...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • Task The task for this assignment is to have the following user-defined data type: struct rgb...

    Task The task for this assignment is to have the following user-defined data type: struct rgb { unsigned char red; unsigned char green; unsigned char blue; }; be able to be: read in from a stream (e.g., std::cin), i.e., write: std::istream& operator >>(std::istream& is, rgb& colour); (see below) written out to a stream (e.g., std::cout), i.e., write: std::ostream& operator <<(std::ostream& os, rgb const& colour); (see below) stored in a container, e.g., std::vector<rgb>, std::array<rgb,16>; (see below) processed via algorithms (and other...

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