I have a mixed database in excel which has a numeric and characters columns.
The final outcome should be various plots that describe our research question which is if there is any connection between district, job sector and more to uneployments percentage. I did a lot of searching and nothing comes up as far as it comes to characters columns. So, I need your help in understanding how can I make a conditional command to create a subset of this database which summarise it.
Here's how the database looks like:
Cdata <-
structure(
list(
Month = c(
"2020-01",
"2020-01",
"2020-01",
"2020-01",
"2020-01",
"2020-01",
"2020-01",
"2020-01",
"2020-01",
"2020-01"
),
District = c(
"Center",
"Center",
"Center",
"Center",
"Center",
"Center",
"Center",
"Center",
"Center",
"Center"
),
Age = c(
"Under 17",
"Under 17",
"Under 17",
"18-24",
"18-24",
"18-24",
"18-24",
"18-24",
"18-24",
"18-24"
),
Gender = c(
"Male",
"Male",
"Female",
"Male",
"Male",
"Male",
"Male",
"Male",
"Male",
"Male"
),
Education = c("0",
"0", "0", "0", "0", "0", "0", "0", "0", "0"),
MedicalDisability = c(
"Without any",
"Without any",
"Without any",
"Without any",
"Without any",
"Without any",
"Without any",
"Without any",
"Without any",
"Without any"
),
Religion = c(
"Jewish",
"Muslims",
"Other",
"Jewish",
"Jewish",
"Jewish",
"Jewish",
"Jewish",
"Jewish",
"Jewish"
),
UneploymentDays = c(
"0-30",
"Over 270",
"Over 270",
"0-30",
"0-30",
"0-30",
"0-30",
"0-30",
"0-30",
"31-180"
),
Occupation = c(
"Laboring class",
"Sales \\ Costumer service",
"Undefinded",
"Laboring class",
"Academic degree",
"Practical engineers / Technicians",
"Undefinded",
"Sales \\ Costumer service",
"Laboring class",
"Practical engineers / Technicians"
),
Jobseekers = c(2L,
1L, 1L, 1L, 1L, 1L, 1L, 2L, 5L, 2L),
GMI = c(0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L),
ACU = c(0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L),
NACU = c(2L, 1L, 1L, 1L, 1L, 1L, 1L,
2L, 5L, 2L),
NewSeekers = c(0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L,
0L, 0L),
NewFiredSeekers = c(0L, 0L, 0L, 0L, 0L, 1L, 0L,
0L, 0L, 0L)
),
row.names = c(NA, 10L),
class = "data.frame"
)
i need a new dataset that looks like this:
District Jobseekers GMI ACU NACU
North 1024 8710 3245 3256
Center 57691 12160 8710 14320
South 21516 9821 5289 18172
And than sort it all over again by age:
Age Jobseekers GMI ACU NACU
Under 17 1024 8710 3245 3256
18-24 57691 12160 8710 14320
25-34 21516 9821 5289 18172
45-54 4682 7142 2365 6128
55-64 1999 1991 2839 1927
Over 64 10918 4289 1378 5368
And than, finally, i need to make plots for each category that shows statistics and make statistic tests as i described. Hope i made my point clearly now. as for the codes, i've tried so many structures and examples, non of them really helped. Let me make it clear - I don't want you to do my work or write the whole code for me, but at the same time i'll mentioned i'm a newbie in R language, and i do this task as a part of a project in data science course. If anything else needed, please let me know.
Here's a screenshot of the database: https://i.stack.imgur.com/fJHWN.jpg
Thanks, Moshe