search for: study1dat

Displaying 4 results from an estimated 4 matches for "study1dat".

2006 Apr 22
1
Missing values detected when there are no missing values
...iables looked like I ran the summary command. One variable had a large number of missing values 54/92. For some reason, all subsequent 74 variables are reported as having 92 NA values, irrespective of whether the original csv variable was complete or not. Below are the commands I ran: > study1dat <- read.csv("c:\\study1r.csv",header=T) > attach(study1dat) > names(study1dat) > summary(study1dat) The second puzzling issue, is that one variable with no missing values is reported in R as having 3 missing values, whereas there are no missing values in the csv file. Th...
2006 Jun 18
1
how to successfully remove missing values for a repeated measures analysis
...ists of 92 rows (1 row per participant) x 186 variables. The steps of the analysis undertaken are outlined below (#). Any assistance is appreciated in relation to how to remove the missing values so the analysis is run. Feedback regarding the prior steps is also welcomed . Bob Green #Step 1 study1dat <- read.csv("c:\\study1.csv",header=T) attach (study1dat) outcome <- c(t1frq, t2frq,t3frq,t4frq) grp <- factor( rep(group, 2,length=368) ) time <- gl(4,92,length=368) subject <- gl(92,1,length=368) data.frame(subject, grp, time, outcome) # there are 3 missing values in $o...
2006 May 08
1
performing functions on variables of different length
...s appeared to have the same number of values . However, when I ran the length command this wasn't the case: length(outcome) [1] 368 > length(grp) [1] 184 > length(subject) [1] 92 > length(time) [1] 184 Below is the syntax I have been using and the date frame that I generated - study1dat <- read.csv("c:\\study1rb.csv",header=T) attach (study1dat) outcome <- c(t1freq, t2freq,t3freq,t4freq) grp <- factor( rep(group, 2) ) time <- gl(4, 46) subject <- gl(46,1,92) data.frame(subject, grp, time, outcome) subject grp time outcome 1 1 0 1...
2006 May 02
0
Enquiry regarding Apply
I want to compute a new variable (newvar) based on the values of two other variables (t1freq, t2freq).The two variables (t1freq,t2freq) are contained in a dataframe - study1dat <- read.csv("c:\\study1rb.csv",header=T) . I gather this computation can be done using Apply and I have run the following example from the help menu ## Compute row and column sums for a matrix: x <- cbind(x1 = 3, x2 = c(4:1, 2:5)) dimnames(x)[[1]] <- letters[1:8]...