Is anyone familiar with the specifics of the syntax for xyplot and lineplot? I can't find anything more specific than this :
lineplot [c?] ( ; color c? )
xyplot [c?][c?] (; select c? == value )
I'm using xyplot and I understand that I need to specify first my X column and then my Y column, and that I can select only trials for which the status is correct, but is there a way to manipulate axis options? Or to plot a variable that isn't saved in a column but rather previously calculated in the feedback section (using mean for example)? Ideally I would want the plot to display only the mean RT, so one data point for each of my 8 set sizes, instead of all the data points.
I'm also wondering if you can set min and max values for the axis, or change the number of tick marks? I'm plotting RT on the Y axis but it's displaying so many tick marks on the Y axis it's difficult to read.
Any knowledge on these commands would be appreciated! Thanks so much!
The help() function is another useful tool when using R and wanting to know more about a certain function. Here is more detailed information on how to use it: www.r-project.org/help.html
In general, it is very convenient, if you save all necessary data for a graph in a data frame [data.frame() would be the function to do so] or a another type of variable, which you then can read the data from. In your case you probably would want to calculate the mean RT for each condition and participant and save it all in a data frame with the participant, condition and mean RT in a column each. If you are only interested in the mean RT per condition across the whole sample, you would just calculate that instead, i.e.:
meansConditions <- aggregate(RT ~ condition, data = alldata, mean)
I have made up names for the variables, which contain all your data. Consequently, you would have to change those accordingly. The function aggregate() can be used for all kind of functions. It provides the possibility to define a formula (in your case your interest of RT for each condition, meaning dependent variable to independent variable), the data place (here I called the variable alldata) and the function you want to apply (here you are interested in the mean, so the mean() function is used justed without the parentheses).
You can define the length of the x and y axes by using xlim and ylim respectively.
I hope this helps you getting further with your analysis plans.
I have used R before, but I will eventually download this experiment and send it to students in the HTML format so they can all do the experiment on their own and get ideally have the results immediately graphed without needing to call R. It is my understanding that this can be achieved with Psytoolkit just on its own, but I might be mistaken.
Post by alexandra (AEC) on Jul 21, 2020 8:57:14 GMT
I fear that I have no experience with those functions in PsyToolkit. I know that it was possible to use an R script in the Linux version to create a nice graph as feedback but I have no idea on the implementation in the online version.