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

Error in if (base$mrun[i] == base$mrun[i + 1] && base$rbd[j] == base$rbd[j + : missing value where TRUE/FALSE needed #22

Open
gabrielazuniga opened this issue May 7, 2020 · 0 comments

Comments

@gabrielazuniga
Copy link

gabrielazuniga commented May 7, 2020

Hi everyone,
I am trying to do compare every one row with the next in two variables but I got that error, my code is:

base$cambio =0
i=j
for (i in 1:length(base[,1])){ #length of mrun
for (j in 1:length(base[,3])){ #length of rbd, same of mrun
if (base$mrun[i]==base$mrun[i+1] && base$rbd[j]==base$rbd[j+1]){
base$cambio[i]=0}
else {base$cambio[i]=1}
}
}

Error in if (base$mrun[i] == base$mrun[i + 1] && base$rbd[j] == base$rbd[j + : missing value where TRUE/FALSE needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant