You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
program error: code follows on the same line as open brace [Need Help]
Hello, I am following these steps (https://www.techtips.surveydesign.co...0off%20command.) to attempt to produce multiple graphs at once, however, I keep getting the following output, how do I fix this? Really appreciate any help.
The error message is self-explanatory. The code that you have put between braces on the same line as the -foreach- command has to be on a separate line. You will also need to place the -vioplot- and -graph export- commands on separate lines. Stata requires all new commands to begin on a new line.
Code:
foreach var in Sublclass Group Level {
vioplot ATF4Targetgenes `var'
graph export ATF4Targetgenes_`var'.png
}
Added: In the future, rather than showing screenshots from the Results window, please copy/paste here into the Forum editor between code delimiters. That way others will be able to copy/paste from your post into their solutions instead of having to type everything over from scratch. If you are not familiar with code delimiters, please consult Forum FAQ #12.
Comment