Error in mean of variable

Hello,

I have just started using RStudio and would appreciate some help.

I am considering an experiment where a group of people were asked to solve a soduko puzzle. The time they spent on solving the puzzle was noted.

I have loaded the data in RStudio and defined new variables to the dataset such as Time and the log of Time. But when I try to find the mean, variance and standard deviation an error appears.

Here is my code (Tid stand for time):

ssData <- read.table("ss1920-udenhold.txt", header=TRUE)

ssData <- transform(ssData, Tid=60*(ssData$Min) + ssData$Sek)

ssData <- subset(ssData, Tid>0)

latinData <- subset(ssData, Type=="Latinsk")

ssData <- transform(ssData, logTid=log(Tid))

mean(Tid)
mean(LogTid)

Appreciate the help.

Tid and LogTid are columns of ssData they do not exist as stand alone objects so try with

mean(ssData$Tid)
mean(ssData$LogTid)

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

1 Like

Thanks you and I'll read through the link you provided.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.