I have a little bit of experience learning R through my courses, but most data sets we worked on were not binary. I am not trying to understand how to analyze binary data sets. I have a file in which cases are labelled as 1 or 0 based on a yes/no system.
I am working on an imported CSV dataset. I have multiple columns with binary and string data, but i want to create a table which displays percentage of people that like apples (from a binary column with 0 for do not like apples and 1 for do like apples) relative to their location (from a string column with three locations: farm 1, farm 2 and farm 3). How can I create a table with percentage of people that like apples form each location if my data is binary?
The table should look like:
Farm 1 | Farm 2 | Farm 3
% People that like Apples
Also, there are certain cases where Farm 2 and Farm 3 have been misspelled as Fram 2/3 multiple times. Is there a way to replace all the mislabelled data entries at once?
Thanks!