You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
My suggestion is to allow for an "if" condition in the command.
Many times, I am importing an excel where many values have not been reviewed yet. This means that I will have a column "Reviewed", used by the data entrant and that takes values 0/1 depending if the data entrant has already reviewed the value. Thus, I only want to readreplace if the entry has reviewed==1. Otherwise, it will replace a value by missing (because "newvalue" is missing by default).
So far I have been using the following workaround, but it would be nice to avoid doing this everytime.
What I do: Import the excel, keep only the value I want, save it as a tempfile, and then apply readreplace to the temfile.
preserve
import excel_filename, (...)
keep if review==1
tempfile excel_file
save `excel_file'
restore
readreplace using `excel_file', use (...)
I think it's a small thing but a very useful one! And please do let me know if there's already a way to do this in the same line as readreplace, maybe I've missed something.
Thank you!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
My suggestion is to allow for an "if" condition in the command.
Many times, I am importing an excel where many values have not been reviewed yet. This means that I will have a column "Reviewed", used by the data entrant and that takes values 0/1 depending if the data entrant has already reviewed the value. Thus, I only want to readreplace if the entry has reviewed==1. Otherwise, it will replace a value by missing (because "newvalue" is missing by default).
So far I have been using the following workaround, but it would be nice to avoid doing this everytime.
What I do: Import the excel, keep only the value I want, save it as a tempfile, and then apply readreplace to the temfile.
I think it's a small thing but a very useful one! And please do let me know if there's already a way to do this in the same line as readreplace, maybe I've missed something.
Thank you!
The text was updated successfully, but these errors were encountered: