Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate function in ClusterTMLE_Functions_v2June2017.R #1

Open
LauraBalzer opened this issue Oct 17, 2019 · 0 comments
Open

Aggregate function in ClusterTMLE_Functions_v2June2017.R #1

LauraBalzer opened this issue Oct 17, 2019 · 0 comments

Comments

@LauraBalzer
Copy link
Owner

@LauraBalzer LauraBalzer commented Oct 17, 2019

The following code (line 585) of ClusterTMLE_Functions_v2June2017.R mistakenly drops the last column of the data.frame valid.

valid<- aggregate(x=valid, by=list(id=valid$id), mean)[,2:ncol(valid)]

One option to avoid this is

valid<- aggregate(x=valid, by=list(id=valid$id), mean)
valid <- valid[,2:ncol(valid)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.