Question

Data in the form of a .csv dataframe that looks like this:

MODE_OF_TRANSPORT FEMALE MALE
1               BUS                  752    541
2             BOATS                487    934
3            TRAINS                391    713
4            PLANES                159    175

MODE_OF_TRANSPORT is a factor with four levels.

MALE and FEMALE are integers representing the sum of individuals surveyed, of each gender, that refers to use, one or more of these modes of transport in the last six months.

I need to write a R code that shows a barplot of this data.

The plot must show numbers regarding each mode of transport by gender, side by side.

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

transport <- read.csv("transport.csv",header=TRUE,sep=",")
t<-read.csv("transport.csv", header=T, sep=";")


table.data <- matrix(c(752,541,487,934,391,713,159,175),nrow=2)
colnames(table.data)<-c("BUS","BOATS","TRAINS","PLANES")
rownames(table.data)<-c("FEMALE","MALE")...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Statistics-R Programming Questions
Homework Solution
$30.00
Mathematics
Statistics
R Programming
Variables
Probability
Samples
Normal Distribution
Comparison
Observations
Null Hypothesis
Population
Variance
Standard Deviation
Type Error
Numerators
Critical Values
Density Lines
Vectors
Plots
Degr
Biostatistics Questions: Principal Component Analysis
Homework Solution
$58.00
Biostatistics
Mathematics
Principal Component Analysis
Programming
Computer Science
Data
Iris Set
Matrices
Covariance
Normalization
Eigenvector
Variables
Summary
Commands
Codes
Sepal Shape
Documentation
Stink Bugs
Homework Solution
$38.00
Mathematics
Statistics
R
Programming
Stink
Bugs
Analysis
Treatments
Predators
Agriculture
Statistics Questions
Homework Solution
$68.00
Statistics
Mathematics
Hypothetical Experiments
Factors
Tables
Model
Regression
Slope
NAP Range
Variance
Species
Richness
Predictors
Coefficient
Determination
Probability Distribution
ANOVA
Functions
Applied Statistics Questions
Homework Solution
$150.00
Applied Statistics
Mathematics
Profile Analysis
ND Data
Transformations
Treatment Effect
Probability
P-Value
Functions
Research
Advanced Biostatistics: Logistic Regression & GLMM
Homework Solution
$48.00
Biostatistics
Logistic Regression
Mathematics
Functions
R Programming
P-Values
Significance
Degrees of Freedom
Normal Distribution
Null Deviances
Residual Deviances
Intercepts
Chi-squared Test
Plots
Get help from a qualified tutor
Live Chats