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
frame df {
gen z = SepalLength + SepalWidth
replace z = _n if _n <= 10
drop z
bysort Species : egen z = sum(SepalLength) if SepalWidth > 3.0
}
Intended Julia syntax
@douglas df begin
gen :z = :SepalLength .+ :SepalWidth
replace :z = _n if _n <= 10
drop :z
bysort :Species : egen :z = sum(:SepalLength) if :SepalWidth .> 3.0
end
Not sure if this is doable as replace etc keywords are neither function call nor macro call.
The text was updated successfully, but these errors were encountered:
I guess it could be made to work, but it's not ideal. Julia automatically parses stuff inside the begin/end block into an Expr, and one would have to reconstruct the string inside the begin/end. What would, however, work, is something like
@douglass df """ gen :z = :SepalLength .+ :SepalWidth replace :z = _n if _n <= 10 drop :z bysort :Species : egen :z = sum(:SepalLength) if :SepalWidth .> 3.0"""
Would this be a good substitute to what you had in mind?
Stata syntax:
Intended Julia syntax
Not sure if this is doable as
replace
etc keywords are neither function call nor macro call.The text was updated successfully, but these errors were encountered: