Hi all, I feel a little stupid making this post as I am completely new to not only R but coding in general. I am struggling to perform a basic chi-squared test on some data. I have downloaded R and have made progress with a few simple functions, but I am otherwise very clueless. I think that I am supposed to use the > chisq.test(tbl) command, however I am not even sure how to insert my data and then turn it into a table! I have watched online tutorials, but the data used in their examples seem fundamentally different, so I'm not sure how to set it up for my own.
This is what my data looks like, it is a .txt file.
It describes two sets of people; treated group "drug" comprised of 100 people who were given a treatment and a larger "control" group who match age/gender profile of the "drug" group (also given the treatment). The numbers show how many people experienced either decrease/no change/increase in blood sugar levels after taking the drug and my aim is to find out whether this treatment effects blood sugar levels.
I am not sure if I am just overthinking this and can simply import the table as it is and literally plug it into the chi squared command. Any help would be really, really appreciated!