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

file c:\ado\personal/b/brewmeta.dta not found (again!) #21

Closed
randomgambit opened this issue Dec 11, 2015 · 34 comments
Closed

file c:\ado\personal/b/brewmeta.dta not found (again!) #21

randomgambit opened this issue Dec 11, 2015 · 34 comments
Assignees
Labels

Comments

@randomgambit
Copy link

Hi,

Thanks for developing this very nice Stata package. I have Stata 13 MP on windows 10 and I tried to use your package but I got the same error message as another user a couple of days ago:

. brewscheme, scheme(set1) allst(set1) allc(5) allsat(80)
file c:\ado\personal/b/brewmeta.dta not found

What should I do? What is the proper way to install brewscheme?

Many thanks for your help!

@wbuchanan
Copy link
Owner

Could you tell me how you installed the program? If you pulled the version from the SSC archives it has a reference to colorbrewer that no longer works. There is information about installation on the project site (http://wbuchanan.github.io/brewscheme). If you installed it from this location (which contains the code from the dev branch) you shouldn't get the error that you had. If you could provide more info about how you installed things I can try to figure out where the issue is.

@randomgambit
Copy link
Author

hi ! thanks for your answer!
I typed
net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") replace

is that correct? then, when I type
. libbrewscheme
file libbrewscheme.mlib could not be opened

what is wrong here?

@wbuchanan
Copy link
Owner

Do you have write permissions on the ADOPATH? The program libbrewscheme is just a convenience command to compile the Mata code on your machine and it writes the file the to ADOPATH by default. Try:

ado, find(brewscheme)
ado uninstall [#]

Where [#] is the number returned from the first line. Maybe there is more than one installation causing a problem or something. If nothing else, if you could do:

set tracedepth 3
set trace on
:::commands that are failing:::

And attach a copy of that output it would help me to track down where the issue is coming from.

@randomgambit
Copy link
Author

there were several different installations.
I uninstalled everything and reinstalled using

net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") replace

still, I cannot run librewscheme. I use windows 10 (should I set up some specific write/read rights on my C drive?)

Please see the following:

. set tracedepth 3

. set trace on

. libbrewscheme
--------------------------------------------------------------------------------- begin libbrewscheme ---

  • version 13.1
  • syntax[, DISplay Locpath ]
  • mata: mata clear
  • if "locpath'"' != "" qui: do libbrewscheme.mata
    = if `""' != "" qui: do libbrewscheme.mata
  • else qui: do "c(sysdir_plus)'l/libbrewscheme.mata"'
    = else qui: do `"c:\ado\plus/l/libbrewscheme.mata"'
  • qui: mata: mata mlib create libbrewscheme, replace size(2048)
    file libbrewscheme.mlib could not be opened

. brewscheme, scheme(set1) allst(set1) allc(5) allsat(80)
------------------------------------------------------------------------------------ begin brewscheme ---

  • version 13.1
  • syntax , SCHEMEname(string asis) [ ALLSTyle(string asis) ALLColors(real 3) ALLSATuration(real 100) BARS

    Tyle(string asis) BARColors(real 3) BARSATuration(real 100) SCATSTyle(string asis) SCATColors(real 3) S
    CATSATuration(real 100) AREASTyle(string asis) AREAColors(real 3) AREASATuration(real 100) LINESTyle(st
    ring asis) LINEColors(real 3) LINESATuration(real 100) BOXSTyle(string asis) BOXColors(real 3) BOXSATur
    ation(real 100) DOTSTyle(string asis) DOTColors(real 3) DOTSATuration(real 100) PIESTyle(string asis) P
    IEColors(real 3) PIESATuration(real 100) SUNSTyle(string asis) SUNColors(real 4) SUNSATuration(real 100
    ) HISTSTyle(string asis) HISTColors(real 3) HISTSATuration(real 100) CISTyle(string asis) CIColors(real
    3) CISATuration(real 100) MATSTyle(string asis) MATColors(real 3) MATSATuration(real 100) REFLSTyle(st
    ring asis) REFLColors(real 3) REFLSATuration(real 100) REFMSTyle(string asis) REFMColors(real 3) REFMSA
    Turation(real 100) CONSTart(string asis) CONEnd(string asis) CONSATuration(real 100) SOMESTyle(string a
    sis) SOMEColors(real 3) SOMESATuration(real 100) REFResh DBug THEMEFile(string asis) SYMBols(string asi
    s) ]

  • loc validsymbols circle diamond triangle square plus X smcircle smdiamond smsquare smtriangle smplus sm

    x circle_hollow diamond_hollow triangle_hollow square_hollow smcircle_hollow smdiamond_hollow smtriangl
    e_hollow smsquare_hollow point none

  • if "symbols'"' != "" {
    = if ""' != "" { loc numsymbols: word count symbols'' forv i = 1/numsymbols' {
    loc thissymbol : wordi' of symbols'' if: list thissymbol in validsymbols' == 0 {
    di as err "The argumentthissymbol' passed to the "' "symbols parameter is invalid. Must be one of "

    ' ": subinstr loc validsymbols " "'", "', all'."'
    err 198
    }
    }
    }

  • else {
  • loc symbols circle
  • }
  • preserve
  • dirfile, p("c(sysdir_personal)'b"')
    = dirfile, p(`"c:\ado\personal/b"')
    ------------------------------------------------------------------------------------- begin dirfile ---
    • version 13
    • syntax , Path(string) [ REBuild ]
    • cap confirm new file "path'"'
      = cap confirm new file `"c:\ado\personal/b"'
    • if _rc == 0 {
      mkdir "path'"'
      di as res "The directorypath' was successfully created."'
      }
    • else if _rc == 602 & "rebuild'" != "" { = else if _rc == 602 & "" != "" { loc dirfiles : dir"path'"' files "*", respectcase forv i = 1/: word count dirfiles'' { di as res"Delete the file : wordi' of dirfiles'' frompath' ? (Y/n)"' request(del)
      if inlist("del'"', "y", "Y", "") {
      erase "path'/: wordi' of dirfiles''"' di as res"Erased the file : path'/: word i' ofdirfiles''"'
      }
      }
      loc dirfiles : dir "path'"' files "
      ", respectcase
      loc subdirs : dir "path'"' dirs "
      ", respectcase
      if "dirfiles'subdirs'"' == "" { di as res"path' is empty. Delete the directory too? (Y/n)"' _request(_del) if inlist("del'"', "y", "Y") { qui: rmdir"`path'"'
      }
      }
      }
    • else if _rc == 602 & "`rebuild'" == "" {
      = else if _rc == 602 & "" == "" {
      di as res "Directory exists and rebuild option not specified. No further action"
      }
    • else if _rc == 603 & "c(os)'"' == "Windows" {
      = else if _rc == 603 & `"Windows"' == "Windows" {
    • }
    • else {
      err _rc
      }
      --------------------------------------------------------------------------------------- end dirfile ---
  • dirfile, p("c(sysdir_plus)'s"')
    = dirfile, p(`"c:\ado\plus/s"')
    ------------------------------------------------------------------------------------- begin dirfile ---
    • version 13
    • syntax , Path(string) [ REBuild ]
    • cap confirm new file "path'"'
      = cap confirm new file `"c:\ado\plus/s"'
    • if _rc == 0 {
      mkdir "path'"'
      di as res "The directorypath' was successfully created."'
      }
    • else if _rc == 602 & "rebuild'" != "" { = else if _rc == 602 & "" != "" { loc dirfiles : dir"path'"' files "*", respectcase forv i = 1/: word count dirfiles'' { di as res"Delete the file : wordi' of dirfiles'' frompath' ? (Y/n)"' request(del)
      if inlist("del'"', "y", "Y", "") {
      erase "path'/: wordi' of dirfiles''"' di as res"Erased the file : path'/: word i' ofdirfiles''"'
      }
      }
      loc dirfiles : dir "path'"' files "
      ", respectcase
      loc subdirs : dir "path'"' dirs "
      ", respectcase
      if "dirfiles'subdirs'"' == "" { di as res"path' is empty. Delete the directory too? (Y/n)"' _request(_del) if inlist("del'"', "y", "Y") { qui: rmdir"`path'"'
      }
      }
      }
    • else if _rc == 602 & "`rebuild'" == "" {
      = else if _rc == 602 & "" == "" {
      di as res "Directory exists and rebuild option not specified. No further action"
      }
    • else if _rc == 603 & "c(os)'"' == "Windows" {
      = else if _rc == 603 & `"Windows"' == "Windows" {
    • }
    • else {
      err _rc
      }
      --------------------------------------------------------------------------------------- end dirfile ---
  • cap confirm new file "c(sysdir_personal)'b/brewmeta.dta"'
    = cap confirm new file `"c:\ado\personal/b/brewmeta.dta"'
  • if inlist(_rc, 0, 603) {
  • qui: brewdb, `refresh'
    = qui: brewdb,
    -------------------------------------------------------------------------------------- begin brewdb ---
    • version 13.1
    • syntax, [REFresh]
    • preserve
    • dirfile, p("c(sysdir_personal)'b"') rebuild
      = dirfile, p(`"c:\ado\personal/b"') rebuild
      ----------------------------------------------------------------------------------- begin dirfile ---
      • version 13
      • syntax , Path(string) [ REBuild ]
      • cap confirm new file "path'"'
        = cap confirm new file `"c:\ado\personal/b"'
      • if _rc == 0 {
        mkdir "path'"'
        di as res "The directorypath' was successfully created."'
        }
      • else if _rc == 602 & "rebuild'" != "" { = else if _rc == 602 & "rebuild" != "" { loc dirfiles : dir"path'"' files "*", respectcase forv i = 1/: word count dirfiles'' { di as res"Delete the file : wordi' of dirfiles'' frompath' ? (Y/n)"' request(del)
        if inlist("del'"', "y", "Y", "") {
        erase "path'/: wordi' of dirfiles''"' di as res"Erased the file : path'/: word i' ofdirfiles''"'
        }
        }
        loc dirfiles : dir "path'"' files "
        ", respectcase
        loc subdirs : dir "path'"' dirs "
        ", respectcase
        if "dirfiles'subdirs'"' == "" { di as res"path' is empty. Delete the directory too? (Y/n)"' _request(_del) if inlist("del'"', "y", "Y") { qui: rmdir"`path'"'
        }
        }
        }
      • else if _rc == 602 & "`rebuild'" == "" {
        = else if _rc == 602 & "rebuild" == "" {
        di as res "Directory exists and rebuild option not specified. No further action"
        }
      • else if _rc == 603 & "c(os)'"' == "Windows" {
        = else if _rc == 603 & `"Windows"' == "Windows" {
      • }
      • else {
        err _rc
        }
        ------------------------------------------------------------------------------------- end dirfile ---
    • cap confirm new file "c(sysdir_personal)'b/brewmeta.dta"'
      = cap confirm new file `"c:\ado\personal/b/brewmeta.dta"'
    • if rc == 0 | "refresh'"' != "" {
      = if rc == 0 | ""' != "" { tempfile brewjs loc date"c(current_date)'"' loc time"c(current_time)'"' qui: copy "http://colorbrewer2.org/colorbrewer_schemes.js"brewjs'.js
      qui: insheet using brewjs'.js, clear qui: erasebrewjs'.js
      qui: drop in 1/7
      qui: split v1, g(z) p("'], 'properties'"') qui: split z1, g(w) parse(": {"')
      forv i = 3/12 {
      if !inlist(i', 9, 12) { qui: g vi' = regexs(1) if regexm(w2, "(i': [.
      ], =i' + 1')"')
      }
      else if i' == 9 { qui: g v9 = regexs(1) if regexm(w2,"(9: [.
      '], 10:)"')
      qui: replace v9 = subinstr(v9, "9:", "", .)
      qui: replace v9 = subinstr(v9, "10:", "", .)
      }
      else if i' == 10 { qui: g v10 = regexs(1) if regexm(w2,"(10: [.'], 11:)"')
      qui: replace v10 = subinstr(v10, "10:", "", .)
      qui: replace v10 = subinstr(v10, "11:", "", .)
      }
      else if i' == 11 { qui: g v11 = regexs(1) if regexm(w2,"(11: [.
      '], 12:)"')
      qui: replace v11 = subinstr(v11, "11:", "", .)
      qui: replace v11 = subinstr(v11, "12:", "", .)
      }
      else {
      qui: g v12 = regexs(1) if regexm(w2, "(12: \[.*)"') } qui: replace vi' = regexr(vi', "(i': [')|(, [0-9])|( [0-9])", "")
      qui: split vi', g(vi'color) parse("', '"') qui: ds vi'color*
      foreach x in r(varlist)' { qui: replacex' = trim(itrim(x')) qui: replacex' = regexr(x', "(rgb\()|(\))", "") qui: replacex' = subinstr(x', ",", " ", .) qui: replacex' = subinstr(x',")"', "", .)
      qui: replace x' = subinstr(x', "]"', "", .) qui: replacex' = subinstr(x',"["', "", .)
      qui: replace x' = subinstr(x', "'"', "", .) qui: replacex' = regexr(x', "( [0-9])", "") qui: replacex' = trim(itrim(x')) } qui: drop vi'
      }
      qui: split v1, gen(palette) parse(": {")
      qui: g palette = regexr(palette1, ".* [DQS][a-z].* _/", "")
      qui: drop if mi(palette)
      qui: keep palette v_color* v1
      qui: g x = regexs(0) if regexm(v1, `"'blind':[[0-2].],'print':[[0-2].],'copy':[[0-2].*],'scre

      en':[[0-2].]"')
      qui: drop if mi(x)
      qui: split x, gen(y) parse("],")
      qui: replace y1 = regexr(y1, "('blind':[)", "")
      qui: replace y2 = regexr(y2, "('print':[)", "")
      qui: replace y3 = regexr(y3, "('copy':[)", "")
      qui: replace y4 = regexr(y4, "('screen':[)", "")
      qui: replace y4 = regexr(y4, "(])", "")
      qui: split y1, gen(colorblind) parse(",")
      qui: split y2, gen(print) parse(",")
      qui: split y3, gen(photocopy) parse(",")
      qui: split y4, gen(lcd) parse(",")
      qui: drop x y1 y2 y3 y4
      forv i = 10(-1)1 {
      rename (colorblindi' printi' photocopyi' lcdi') (colorblind= i' + 2' print= i' + 2' photocopy
      = i' + 2' lcd= i' + 2')
      }
      qui: keep palette v
      color* colorblind* print* photocopy* lcd*
      qui: reshape long v3color v4color v5color v6color v7color v8color v9color v10color v11color v12color
      colorblind print photocopy lcd, i(palette) j(colorid)
      qui: rename v#color v#
      qui: reshape long v, i(palette colorblind print photocopy lcd colorid) j(pcolor)
      qui: drop if mi(v)
      qui: rename v rgb
      qui: replace rgb = cond(regexm(rgb, "([0-9][0-9][0-9][0-9]$)"), substr(rgb, 1, 11), cond(regexm(rgb,
      "(^[0-9][0-9][0-9][0-9])"), substr(rgb, 2, 12), rgb))
      qui: replace palette = lower(palette)
      qui: destring colorblind print photocopy lcd, replace
      qui: bys palette (pcolor colorid): egen maxcolors = max(pcolor)
      foreach v of var colorblind print photocopy lcd {
      qui: replacev' = .n if mi(v')
      }
      la def colorblind 0 "Not color blind friendly" 1 "Color blind friendly" 2 "Possibly color blind frien
      dly" .n "Missing Data on Colorblind Friendliness", modify
      la def print 0 "Not print friendly" 1 "Print friendly" 2 "Possibly print friendly" .n "Missing Data o
      n Print Friendliness", modify
      la def photocopy 0 "Not photocopy friendly" 1 "Photocopy friendly" 2 "Possibly photocopy friendly" .n
      "Missing Data on Photocopier Friendliness", modify
      la def lcd 0 "Not LCD friendly" 1 "LCD friendly" 2 "Possibly LCD friendly" .n "Missing Data on LCD Fr
      iendliness", modify
      la val colorblind colorblind
      la val print print
      la val photocopy photocopy
      la val lcd lcd
      qui: egen seqid = concat(palette pcolor colorid)
      loc qual1""accent", "dark2", "paired", "pastel1", "pastel2""' loc qual2 ""set1", "set2", "set3""'
      loc seq1""blues", "bugn", "bupu", "gnbu", "greens", "greys""' loc seq2 ""oranges", "orrd", "pubu", "pubugn", "purd", "purples""'
      loc seq3""rdpu", "reds", "ylgn", "ylgnbu", "ylorbr", "ylorrd""' loc div1 ""brbg", "piyg", "prgn", "puor", "rdbu", "rdgy""'
      loc div2""rdylbu", "rdylgn", "spectral""' loc qual "qual1', qual2'"'
      loc seq"seq1',seq2', seq3'"'
      loc div"div1',div2'"' qui: g meta = cond(inlist(palette, qual1'), "Qualitative", cond(inlist(palette,qual2'), "Qualitati ve", cond(inlist(palette, seq1'), "Sequential", cond(inlist(palette,seq2'), "Sequential", cond(inlis t(palette, seq3'), "Sequential", cond(inlist(palette,div1'), "Divergent", cond(inlist(palette, div2
      '), "Divergent", "")))))))
      char _dta[qualitative]"qual'"'
      char _dta[divergent]"div'"'
      char _dta[sequential]"seq'"'
      char _dta[palettes]"qual',seq', div'"'
      qui: count
      loc N = r(N)
      forv i = 1/N' { loc stem ": di seqid[i']'" foreach v of var colorblind lcd photocopy print meta { if substr(": type v''"', 1, 3) != "str" {
      loc theproperty : label(v') : div'[i']'
      }
      else {
      loc theproperty : div'[i']
      }
      qui: char def _dta[stem'_v']"theproperty'"'
      }
      }
      la var palette "Name of Color Palette"
      la var pcolor "Palette by Colors Selected ID"
      la var colorblind "Colorblind Indicator"
      la var photocopy "Photocopy Indicator"
      la var print "Print Indicator"
      la var lcd "LCD/Laptop Indicator"
      la var seqid "Sequential ID for property lookups"
      la var colorid "Within pcolor ID for individual color look ups"
      la var rgb "Red-Green-Blue Values to Build Scheme Files"
      la var maxcolors "Maximum number of colors allowed for the palette"
      la var meta "Meta-Data Palette Characteristics (see char _meta[*] for more info)"
      qui: char meta[Qualitative] "ColorBrewer Palettes Designed for Nominal/Ordinal Scale Variables"
      qui: char meta[Sequential] "ColorBrewer Palettes Designed for Intervallic/Ratio Scale Variables"
      qui: char meta[Divergent] "ColorBrewer Palettes Designed for Variables Encoding Deviances"
      qui: compress
      loc pdate"c(current_date)'"'
      loc ptime"c(current_time)'"'
      qui: char def _dta[timestamp]"Data Retrieved on date' attime'"' qui: char def _dta[rooturl] "http://www.colorbrewer2.org/" qui: char def _dta[filename] "colorbrewer_schemes.js" qui: char def _dta[citation] "Brewer, C. A. (200x). http://www.ColorBrewer.org. Retrieved ondate'" ' qui: char def _dta[processtime] "Finished processing atptime' on pdate'"'
      qui: char def _dta[munged] "JavaScript Munged by brewdb"
      qui: char def _dta[brew] "brewmeta is available from the SSC Archives."
      qui: char def _dta[brew2]"Use: "ssc inst brewscheme" to install"' qui: char def _dta[brew3] "Development branch available at: " qui: char def _dta[brew4] "https://github.com/wbuchanan/brewscheme" qui: replace rgb = "0 60 48" if palette == "brbg" & pcolor == 10 & colorid == 10 qui: replace rgb = "106 61 154" if palette == "paired" & pcolor == 10 & colorid == 10 qui: replace rgb = "0 68 27" if palette == "prgn" & pcolor == 10 & colorid == 10 qui: replace rgb = "45 0 75" if palette == "puor" & pcolor == 10 & colorid == 10 qui: replace rgb = "5 48 97" if palette == "rdbu" & pcolor == 10 & colorid == 10 qui: replace rgb = "26 26 26" if palette == "rdgy" & pcolor == 10 & colorid == 10 qui: replace rgb = "49 54 149" if palette == "rdylbu" & pcolor == 10 & colorid == 10 qui: replace rgb = "0 104 55" if palette == "rdylgn" & pcolor == 10 & colorid == 10 qui: replace rgb = "94 79 162" if palette == "spectral" & pcolor == 10 & colorid == 10 qui: brewtransform rgb qui: datasignature set qui: save "`c(sysdir_personal)'b/brewmeta.dta"', replace
      qui: brewextra, ref
      }

    • else {
    • di as res "The file : "' _n"c(sysdir_personal)'b/brewmeta.dta"' _n"already exists and will not

      be rebuilt."'
      = di as res "The file : "' _n"c:\ado\personal/b/brewmeta.dta"' _n `"already exists and will not be r
      ebuilt."'

    • di `"To rebuild the database pass the refresh option to brewscheme."'
    • }
    • restore
      ---------------------------------------------------------------------------------------- end brewdb ---
  • qui: use "c(sysdir_personal)'b/brewmeta.dta"', clear
    = qui: use `"c:\ado\personal/b/brewmeta.dta"', clear
    file c:\ado\personal/b/brewmeta.dta not found
    }
    -------------------------------------------------------------------------------------- end brewscheme ---
    r(601);

.

@randomgambit
Copy link
Author

ran Stata in admin mode, then some progress:

. libbrewscheme
.mlib libraries to be searched are now
lmatabase;lmataado;lmatafc;lmatagsem;lmataopt;lmatapath;lmatapss;lmatasem;libbrewscheme;libjson;libre

cycle;livreg2;lkdens;lmoremata;lmoremata10;lmoremata14;l_cfrmt

. brewcolordb, ref
This program needs to clear all data currently in memory. If this is ok hit enter, otherwise enter the le

tter 'n' and hit enter to exit the program without clearing data from memory..
(142 real changes made)
file c:\ado\personal/brewcolors/colordb.dta could not be opened
r(603);

@randomgambit
Copy link
Author

damn! I hope we find a solution! I would love to try your package! ;-)

@randomgambit
Copy link
Author

also, I use many other packages and I never had any permission problems or others... that s very weird

@randomgambit
Copy link
Author

just in case:

. sysdir
STATA: C:\Program Files\Stata13\Stata13
BASE: C:\Program Files\Stata13\Stata13\ado\base
SITE: C:\Program Files\Stata13\Stata13\ado\site
PLUS: c:\ado\plus
PERSONAL: c:\ado\personal
OLDPLACE: c:\ado\

I dont have a /personal folder though. everything is in plus. could that generate the problem? Also, I see that in the error message

c:\ado\personal/b/brewmeta.dta not found

you have both "/" and "". Is that a problem?

thanks again for your time

@wbuchanan
Copy link
Owner

You should be fine if you:

mkdir C:/ado/personal 

Assuming, of course, that you have write permissions in C:\ado. It is relatively normal practice to store some items in the personal directory on the ADOPATH and in the case of these programs there are several specialized subdirectories that are created in the personal subdirectory to store files used to look up color values, store metadata, etc... After you add the subdirectory it shouldn't be an issue, but I'll look into adding a fix to handle cases like your's where there is no existing personal directly available at install.

There is now a possible fix for this issue in the branch personaldirectory (has modified versions of brewcolordb.ado and brewscheme.ado.

@wbuchanan wbuchanan added the bug label Dec 11, 2015
@wbuchanan wbuchanan self-assigned this Dec 11, 2015
@randomgambit
Copy link
Author

Good morning!
I created the personal folder in ado (I have admin rights actually), but the problem still remains:

. brewcolordb, ref
This program needs to clear all data currently in memory. If this is ok hit enter, otherwise enter the letter 'n' and hit enter to exit the program without clearing data from memory..
brewcolordb, ref
(142 real changes made)
file c:\ado\personal/brewcolors/colordb.dta could not be opened

If this is just some dta container that you use later one, maybe you could include it directly in the files downloaded using net install?

@wbuchanan
Copy link
Owner

You do have write permissions for C:\ado correct? The problem with including the file with the install is the volume of the different files and potential differences in users' platforms. For example, if you had a named color style installed on your system that was not available on my system, this program should pick it up so the colors could be translated for color sight impairments and store them as well for future lookups. Do you have the subdirectory C:\ado\personal\brewcolors? It seems like it might be a problem with file permissions and may be unique to Windoze 10. Are you able to try running things on a different OS to confirm the same issue? I'll try testing things from the office this morning, but I don't have access to the same OS as you and this may take a bit of time/effort to fix. That said, I'm sure others who will not encounter the same issue would be grateful. In the meantime if you could

set tracedepth 3
set trace on
brewcolordb, ref

That might provide a bit more information that I could use to try hunting this down. You could also try to copy the brewcolordb and brewscheme ado files from the personaldirectory branch to see if that fixes the problem (just copy over the existing files with those versions to see if what I added this morning fixes the issue for you).

@randomgambit
Copy link
Author

i am more and more convinced that this is a problem due to Windows 10 enforcing read-only rights on many folders. http://www.cnet.com/forums/discussions/windows-10-changed-all-my-documents-to-read-only/

@wbuchanan
Copy link
Owner

Have you tried to change the file permissions for C:\ado? If you allow yourself read and write permissions I imagine that would resolve things. If that works, let me know so I can make sure the issue gets closed.

@randomgambit
Copy link
Author

ok, problem fixed.

Actually it is a huge pain in the CPU due to a known bug from windows 10. Basically the issue is that updating to windows 10 from previous versions of windows messes up the reading/writing rights of many files, in a way that is not very easy to regain control over them. I had to move my files to another hard drive, manage admin rights, and create each single folder brewscheme needs manually. See the url above.

So here would be my recommendations for this package:

  1. I am an avid user of Stata packages, and this is the first time ever that a package needs to create folders for its use. While that seems innocuous, you can see that this can create massive problems for windows 10 users. Addidionally, many of us use the packages on network or work machines where admin rights are not available. Maybe you should be thinking about putting everything in the same folder if that's possible.
  2. It would be of invaluable help to have all the color palettes availables for us to see on your website. So that a user does not have to open colorbrewer, and then ggplot, and other stuff. What do you think?

In sum, congrats for this amazing great work and hopefully you will find my comments useful!!

@wbuchanan
Copy link
Owner

I appreciate the difficulty and pain you're dealing with. Issues like that are what led me to abandon the Windoze platform several years ago. It is possible to put all of the stuff in the same directory, but then creates a huge mess in everyone's ADOPATH (remember every time you create a theme/scheme file there are actually 5 separate files being generated); the idea for this type of file management actually grew out of an old presentation from Vince Wiggins at one of the user group conferences where a new subdirectory would be created in the user's personal directory to store the different help files that made up the smcl "slide deck". However, knowing that this is an issue, what I can and am more than happy/willing to do is add some additional information about this issue to any installation instructions.

With regards to the second suggestion, I definitely planned to add more examples of things. The ggplot2 default colors - in particular - are a bit more difficult to easily explain as the palettes are a function of the number of colors (it uses a linear interpolation of the hue parameter in HSL color space and divides the space evenly based on the number of requested colors [for the most part]). I still haven't gotten around to it, but that was a large part of the reason for creating brewviewer and brewcbsim (e.g., to provide end users with some tools that would make it easier for them to view different combinations of colors and/or palettes in ways that I may not fully anticipate). As I finish some of the last modifications for some of the features I'll try to add more examples to things. If there are specific examples that you think would be helpful/beneficial feel free to let me know and I can try to get some of it built out. I'll also try to get a Wiki set up so that others will be able to contribute examples and things like that to the package repository as well.

Thanks again,
Billy

@randomgambit
Copy link
Author

thanks!
regarding 1) I still dont think this is a problem.
Do you know that the packages are actually organized in alphabetical folders?
That is, everything brewscheme related will be included in C/ado/plus/b/

Personally speaking, nobody ever looks at what's inside these folders. You just download the right ado file in the right folder and that's it. Putting all your files there wouldnt create a particular mess I think

@wbuchanan
Copy link
Owner

The comment regarding showing all the palettes is now posted on the brewviewer page. To replicate on your system:

// Load the dataset with all of the palettes/data
use `"`c(sysdir_personal)'b/brewmeta.dta"', clear

// Create the subdirectory where the graphs will be stored
mkdir ~/Desktop/brewviewerExamples

// Get the list of palettes stored in a local macro
qui: levelsof palette, loc(pal)

// Loop over the palette names
foreach v of loc pal {

    // Get the maxmimum number of colors available from the palette
    qui: su maxcolors if palette == "`v'", meanonly

    // Store the colors in a local
    loc colors `r(mean)'

    // Call brewviewer with the sequential and impaired options
    brewviewer `v', c(`colors') s im

    // Store the files in the directory created above as a .png file
    gr export ~/Desktop/brewviewerExamples/`v'_`colors'.png, as(png) replace

    // Close the graph window
    gr close _all

    // Drop the sersets
    serset drop _all

    // Clear any sersets in active memory
    serset clear

} // End Loop over the palette names

Since users can add their own palettes to the dataset, the viewer was developed to avoid the inconvenience of having to check multiple locations to see how the palettes look. With a smaller number of palettes x colors the default behavior is to keep each of the graphs open in the graph window using the name option of the graph commands.

@tiemann
Copy link

tiemann commented Jan 18, 2016

I have the same problem - what is the recommended fix?

@wbuchanan
Copy link
Owner

Is C:/ado/personal writable on your machine? Some people have had issues with file permissions that cause an error writing the file to that location. Otherwise, if you could copy exactly what you typed (preferably with set trace on and set tracedepth 2) it would be easier to diagnose what the issue is.

@tiemann
Copy link

tiemann commented Jan 19, 2016

This is all the output, from the installation to the error message:

. net set ado "c:\ado\personal/"

. ssc install brewscheme, all replace
checking brewscheme consistency and verifying not already installed...
installing into c:\ado\personal/...
installation complete.

. net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") replace al

l
checking brewscheme consistency and verifying not already installed...

the following files will be replaced:
c:\ado\personal/jar\brewterpolate.jar
c:\ado\personal/h\hextorgb.ado
c:\ado\personal/l\librecycle.mlib
c:\ado\personal/r\recycle.mo

installing into c:\ado\personal/...
installation complete.

copying into current directory...
copying brewthemedata.do
copying extracolors.do
ancillary files successfully copied.

. libbrewscheme
.mlib libraries to be searched are now
lmatabase;lmataado;lmatafc;lmatagsem;lmatamcmc;lmataopt;lmatapath;lmataposte

st;lmatapss;lmatasem;librecycle;libbrewscheme;libjson;livreg2;lmoremata;lmorem
ata10;lmoremata14;luse13;lusespss;l_cfrmt

. brewcolordb
This program needs to clear all data currently in memory. If this is ok hit ente

r, otherwise enter the letter 'n' and hit enter to exit the program without cl
earing data from memory..
The file c:\ado\personal/brewcolors/colordb.dta already exists and will not be o
verwritten

. brewscheme, scheme(punk1) allst(purples)
.mlib libraries to be searched are now
lmatabase;lmataado;lmatafc;lmatagsem;lmatamcmc;lmataopt;lmatapath;lmataposte

st;lmatapss;lmatasem;librecycle;libbrewscheme;libjson;livreg2;lmoremata;lmorem
ata10;lmoremata14;luse13;lusespss;l_cfrmt
file c:\ado\personal/brewcolors/colordb.dta not found
stata(): 3598 Stata returned error
brewcolors::new(): - function returned error
brewcolors(): - function returned error
: - function returned error

@tiemann
Copy link

tiemann commented Jan 19, 2016

And here is the trace, for the last command which gives the error:

. brewscheme, scheme(punk1) allst(purples)
----------------------------------------------------------- begin brewscheme ---

  • version 13.1
  • syntax , SCHEMEname(string asis) [ ALLSTyle(string asis) ALLColors(real 3) ALL

    SATuration(real 100) BARSTyle(string asis) BARColors(real 3) BARSATuration(rea
    l 100) SCATSTyle(string asis) SCATColors(real 3) SCATSATuration(real 100) AREA
    STyle(string asis) AREAColors(real 3) AREASATuration(real 100) LINESTyle(strin
    g asis) LINEColors(real 3) LINESATuration(real 100) BOXSTyle(string asis) BOXC
    olors(real 3) BOXSATuration(real 100) DOTSTyle(string asis) DOTColors(real 3)
    DOTSATuration(real 100) PIESTyle(string asis) PIEColors(real 3) PIESATuration(
    real 100) SUNSTyle(string asis) SUNColors(real 4) SUNSATuration(real 100) HIST
    STyle(string asis) HISTColors(real 3) HISTSATuration(real 100) CISTyle(string
    asis) CIColors(real 3) CISATuration(real 100) MATSTyle(string asis) MATColors(
    real 3) MATSATuration(real 100) REFLSTyle(string asis) REFLColors(real 3) REFL
    SATuration(real 100) REFMSTyle(string asis) REFMColors(real 3) REFMSATuration(
    real 100) CONSTart(string asis) CONEnd(string asis) CONSATuration(real 100) SO
    MESTyle(string asis) SOMEColors(real 3) SOMESATuration(real 100) REFResh DBug
    THEMEFile(string asis) SYMBols(string asis) ]

  • brewlibcheck
    ------------------------------------------------------- begin brewlibcheck ---
    • version 13.1
    • cap confirm new file "c(sysdir_plus)'l/libbrewscheme.mlib"'
      = cap confirm new file `"c:\ado\plus/l/libbrewscheme.mlib"'
    • if _rc == 0 {
    • libbrewscheme, replace size(2048)
      .mlib libraries to be searched are now
      lmatabase;lmataado;lmatafc;lmatagsem;lmatamcmc;lmataopt;lmatapath;lmataposte

      st;lmatapss;lmatasem;librecycle;libbrewscheme;libjson;livreg2;lmoremata;lmorem
      ata10;lmoremata14;luse13;lusespss;l_cfrmt

    • }
    • else {
      filesys c(sysdir_plus)'l/libbrewscheme.mlib, attr ifr(creatednum)' < clock("18dec2015 00:00:00", "YMDhms") {
      libbrewscheme, replace size(2048)
      }
      }
      --------------------------------------------------------- end brewlibcheck ---
  • loc validsymbols circle diamond triangle square plus smcircle smdiamond smsqua

    re smtriangle smplus smx circle_hollow diamond_hollow triangle_hollow square_h
    ollow smcircle_hollow smdiamond_hollow smtriangle_hollow smsquare_hollow point
    none

  • if "symbols'"' != "" {
    = if ""' != "" { loc numsymbols: word count symbols'' forv i = 1/numsymbols' {
    loc thissymbol : wordi' of symbols'' if: list thissymbol in validsymbols' == 0 {
    di as err "The argumentthissymbol' passed to the "' "symbols parameter is i

    nvalid. Must be one of "' ": subinstr loc validsymbols " "'", "', all'."
    '
    err 198
    }
    }
    }

  • else {
  • loc numsymbols = 1
  • loc symbols circle
  • }
  • preserve
  • dirfile, p("c(sysdir_personal)'b"')
    = dirfile, p(`"c:\ado\personal/b"')
    ------------------------------------------------------------ begin dirfile ---
    • version 13
    • syntax , Path(string) [ REBuild ]
    • cap confirm new file "path'"'
      = cap confirm new file `"c:\ado\personal/b"'
    • if _rc == 0 {
      mkdir "path'"'
      di as res "The directorypath' was successfully created."'
      }
    • else if _rc == 602 & "rebuild'" != "" { = else if _rc == 602 & "" != "" { loc dirfiles : dir"path'"' files "*", respectcase forv i = 1/: word count dirfiles'' { di as res"Delete the file : wordi' of dirfiles'' frompath' ? (Y/n)"'

      request(del)
      if inlist("del'"', "y", "Y", "") {
      erase "path'/: wordi' of dirfiles''"' di as res"Erased the file : path'/: word i' ofdirfiles''"'
      }
      }
      loc dirfiles : dir "path'"' files "
      ", respectcase
      loc subdirs : dir "path'"' dirs "
      ", respectcase
      if "dirfiles'subdirs'"' == "" { di as res"path' is empty. Delete the directory too? (Y/n)"' _request(_de l) if inlist("del'"', "y", "Y") { qui: rmdir"`path'"'
      }
      }
      }

    • else if _rc == 602 & "`rebuild'" == "" {
      = else if _rc == 602 & "" == "" {
      di as res "Directory exists and rebuild option not specified. No further ac

      tion"
      }

    • else if _rc == 603 & "c(os)'"' == "Windows" {
      = else if _rc == 603 & `"Windows"' == "Windows" {
    • }
    • else {
      err _rc
      }
      -------------------------------------------------------------- end dirfile ---
  • dirfile, p("c(sysdir_plus)'s"')
    = dirfile, p(`"c:\ado\plus/s"')
    ------------------------------------------------------------ begin dirfile ---
    • version 13
    • syntax , Path(string) [ REBuild ]
    • cap confirm new file "path'"'
      = cap confirm new file `"c:\ado\plus/s"'
    • if _rc == 0 {
      mkdir "path'"'
      di as res "The directorypath' was successfully created."'
      }
    • else if _rc == 602 & "rebuild'" != "" { = else if _rc == 602 & "" != "" { loc dirfiles : dir"path'"' files "*", respectcase forv i = 1/: word count dirfiles'' { di as res"Delete the file : wordi' of dirfiles'' frompath' ? (Y/n)"'

      request(del)
      if inlist("del'"', "y", "Y", "") {
      erase "path'/: wordi' of dirfiles''"' di as res"Erased the file : path'/: word i' ofdirfiles''"'
      }
      }
      loc dirfiles : dir "path'"' files "
      ", respectcase
      loc subdirs : dir "path'"' dirs "
      ", respectcase
      if "dirfiles'subdirs'"' == "" { di as res"path' is empty. Delete the directory too? (Y/n)"' _request(_de l) if inlist("del'"', "y", "Y") { qui: rmdir"`path'"'
      }
      }
      }

    • else if _rc == 602 & "`rebuild'" == "" {
      = else if _rc == 602 & "" == "" {
      di as res "Directory exists and rebuild option not specified. No further ac

      tion"
      }

    • else if _rc == 603 & "c(os)'"' == "Windows" {
      = else if _rc == 603 & `"Windows"' == "Windows" {
    • }
    • else {
      err _rc
      }
      -------------------------------------------------------------- end dirfile ---
  • cap confirm new file "c(sysdir_personal)'b/brewmeta.dta"'
    = cap confirm new file `"c:\ado\personal/b/brewmeta.dta"'
  • if inlist(_rc, 0, 603) {
    qui: brewdb, refresh' qui: use"`c(sysdir_personal)'b/brewmeta.dta"', clear
    }
  • cap confirm new file "c(sysdir_personal)'b/brewmeta.dta"'
    = cap confirm new file `"c:\ado\personal/b/brewmeta.dta"'
  • if inlist(_rc, 0, 603) | "refresh'" != "" { = if inlist(_rc, 0, 603) | "" != "" { qui: brewdb,refresh'
    qui: use "c(sysdir_personal)'b/brewmeta.dta"', clear
    }
  • else {
  • qui: use "c(sysdir_personal)'b/brewmeta.dta"', clear
    = qui: use `"c:\ado\personal/b/brewmeta.dta"', clear
  • }
  • qui: levelsof palette, loc(palettes)
    ----------------------------------------------------------- begin levelsof ---
    • version 9
    • syntax varname [if] [in] [, Separate(str) MISSing Local(str) Clean ]
    • if (_N==0) {
      error 2000
      }
    • if "`separate'" == "" local sep " "
      = if "" == "" local sep " "
    • else local sep "`separate'"
      = else local sep ""
    • if "`missing'" != "" local novarlist "novarlist"
      = if "" != "" local novarlist "novarlist"
    • marksample touse, strok `novarlist'
      = marksample touse, strok
    • capture confirm numeric variable `varlist'
      = capture confirm numeric variable palette
    • local isnum = _rc != 7
    • local maclen 0
    • if isnum' { = if 0 { tempname Vals qui capture tabvarlist' if touse',missing' matrow(Vals') if !(_rc) { local nvals = r(r) forval i = 1 /nvals' {
      local val = Vals'[i',1]
      if i' <nvals' local vals "vals'val'sep'" else local vals "vals'val'" } } else { tempvar select counter bysorttouse' varlist' : gen byteselect' = (_n == 1) * touse' generatecounter' = sum(select') * (select' == 1)
      sort counter' qui count ifcounter' == 0
      local j = 1 + r(N)
      local nvals = _N
      forval i = j' /nvals' {
      local val = varlist'[i']
      if (i' <nvals') {
      local cmdlen = length("local vals "\vals'=varlist'[i']'sep'""')
      local cmd "local vals "\vals'=varlist'[i']'sep'""'
      }
      else {
      local cmdlen = length("local vals "\vals'=varlist'[i']'""') local cmd "local vals "`vals'=varlist'[i']'""' } local maclen = maclen' +:length local val' + :length local sep'
      if ((maclen' + cmdlen') >c(macrolen)') { di as err "macro length exceeded" exit 1000 } else cmd'
      }
      }
      }
    • else {
    • tempvar select counter
    • bysort touse'varlist' : gen byte select' = (_n == 1) *touse'
      = bysort __000001 palette : gen byte __000002 = (_n == 1) * __000001
    • generate counter' = sum(select') * (`select' == 1)
      = generate __000003 = sum(__000002) * (__000002 == 1)
    • sort `counter'
      = sort __000003
    • qui count if `counter' == 0
      = qui count if __000003 == 0
    • local j = 1 + r(N)
    • local nvals = _N
    • if "clean'" != "" { = if "" != "" { forval i =j' / nvals' { if (i' < nvals') { local cmdlen = length("local vals "vals'=varlist'[i']'sep'""') local cmd "local vals "`vals'=varlist'[i']'sep'""'
      }
      else {
      local cmdlen = length("local vals "\vals'=varlist'[i']'""') local cmd "local vals "`vals'=varlist'[i']'""' } local maclen = maclen' + length("=varlist'[i']'"') + length("sep'"')
      if ((maclen' + cmdlen') >c(macrolen)') { di as err "macro length exceeded" exit 1000 } else cmd'
      }
      }
    • else {
    • forval i = j' /nvals' {
      = forval i = 1819 / 1877 {
    • if (i' <nvals') {
      = if (1819 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 0 + length("accent"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((11 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals"`"accent"' "'
    • }
    • if (i' <nvals') {
      = if (1820 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 11 + length("activitiesa"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((27 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "'
    • }
    • if (i' <nvals') {
      = if (1821 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 27 + length("activitiest"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((43 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' `"activitiest"' "'
    • }
    • if (i' <nvals') {
      = if (1822 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 43 + length("blues"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((53 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' "'
    • }
    • if (i' <nvals') {
      = if (1823 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 53 + length("brandsa"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((65 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"' "'

    • }
    • if (i' <nvals') {
      = if (1824 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 65 + length("brandse"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((77 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'`"brandse"' "'

    • }
    • if (i' <nvals') {
      = if (1825 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 77 + length("brbg"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((86 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"' "'

    • }
    • if (i' <nvals') {
      = if (1826 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 86 + length("bugn"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((95 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'`"bugn"' "'

    • }
    • if (i' <nvals') {
      = if (1827 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 95 + length("bupu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((104 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"' "'

    • }
    • if (i' <nvals') {
      = if (1828 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 104 + length("carsa"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((114 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'`"carsa"' "'

    • }
    • if (i' <nvals') {
      = if (1829 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 114 + length("carse"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((124 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"' "'

    • }
    • if (i' <nvals') {
      = if (1830 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 124 + length("category10"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((139 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'`"category10
      "' "'

    • }
    • if (i' <nvals') {
      = if (1831 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 139 + length("category20"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((154 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"' "'

    • }
    • if (i' <nvals') {
      = if (1832 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 154 + length("category20b"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((170 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'`"category20b"' "'

    • }
    • if (i' <nvals') {
      = if (1833 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 170 + length("category20c"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((186 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"' "'

    • }
    • if (i' <nvals') {
      = if (1834 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 186 + length("dark2"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((196 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'`"dark2"' "'

    • }
    • if (i' <nvals') {
      = if (1835 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 196 + length("drinksa"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((208 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"' "'

    • }
    • if (i' <nvals') {
      = if (1836 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 208 + length("drinkse"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((220 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'`"drin
      kse"' "'

    • }
    • if (i' <nvals') {
      = if (1837 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 220 + length("featuresa"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((234 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"' "'

    • }
    • if (i' <nvals') {
      = if (1838 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 234 + length("featurest"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((248 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'`"featurest"' "'

    • }
    • if (i' <nvals') {
      = if (1839 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 248 + length("fooda"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((258 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"' "'

    • }
    • if (i' <nvals') {
      = if (1840 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 258 + length("foode"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((268 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'`"foode"' "'

    • }
    • if (i' <nvals') {
      = if (1841 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 268 + length("fruita"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((279 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"' "'

    • }
    • if (i' <nvals') {
      = if (1842 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 279 + length("fruite"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((290 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'`"fruite"' "'

    • }
    • if (i' <nvals') {
      = if (1843 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 290 + length("ggplot2"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((302 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"' "'

    • }
    • if (i' <nvals') {
      = if (1844 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 302 + length("gnbu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((311 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'`"gnbu"' "'

    • }
    • if (i' <nvals') {
      = if (1845 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 311 + length("greens"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((322 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"' "'

    • }
    • if (i' <nvals') {
      = if (1846 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 322 + length("greys"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((332 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'`"greys"' "'

    • }
    • if (i' <nvals') {
      = if (1847 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 332 + length("mdebar"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((343 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"' "'

    • }
    • if (i' <nvals') {
      = if (1848 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 343 + length("mdepoint"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((356 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'`"mdepoint"' "'

    • }
    • if (i' <nvals') {
      = if (1849 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 356 + length("oranges"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((368 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"' "'

    • }
    • if (i' <nvals') {
      = if (1850 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 368 + length("orrd"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((377 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'`"
      orrd"' "'

    • }
    • if (i' <nvals') {
      = if (1851 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 377 + length("paired"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((388 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"' "'

    • }
    • if (i' <nvals') {
      = if (1852 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 388 + length("pastel1"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((400 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'`"pastel1"' "'

    • }
    • if (i' <nvals') {
      = if (1853 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 400 + length("pastel2"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((412 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"' "'

    • }
    • if (i' <nvals') {
      = if (1854 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 412 + length("piyg"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((421 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'`"piyg"' "'

    • }
    • if (i' <nvals') {
      = if (1855 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 421 + length("prgn"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((430 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"' "'

    • }
    • if (i' <nvals') {
      = if (1856 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 430 + length("pubu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((439 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'`"pubu"' "'

    • }
    • if (i' <nvals') {
      = if (1857 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 439 + length("pubugn"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((450 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      ' "'

    • }
    • if (i' <nvals') {
      = if (1858 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 450 + length("puor"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((459 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '`"puor"' "'

    • }
    • if (i' <nvals') {
      = if (1859 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 459 + length("purd"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((468 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"' "'

    • }
    • if (i' <nvals') {
      = if (1860 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 468 + length("purples"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((480 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'`"purples"' "'

    • }
    • if (i' <nvals') {
      = if (1861 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 480 + length("rdbu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((489 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"' "'

    • }
    • if (i' <nvals') {
      = if (1862 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 489 + length("rdgy"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((498 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'`"rdgy"' "'

    • }
    • if (i' <nvals') {
      = if (1863 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 498 + length("rdpu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((507 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"' "'

    • }
    • if (i' <nvals') {
      = if (1864 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 507 + length("rdylbu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((518 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'`"rdylbu"' "'

    • }
    • if (i' <nvals') {
      = if (1865 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 518 + length("rdylgn"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((529 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "' "'

    • }
    • if (i' <nvals') {
      = if (1866 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 529 + length("reds"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((538 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'`"reds"' "'

    • }
    • if (i' <nvals') {
      = if (1867 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 538 + length("set1"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((547 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"' "'

    • }
    • if (i' <nvals') {
      = if (1868 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 547 + length("set2"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((556 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'`"set2"' "'

    • }
    • if (i' <nvals') {
      = if (1869 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 556 + length("set3"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((565 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"' "'

    • }
    • if (i' <nvals') {
      = if (1870 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 565 + length("spectral"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((578 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'`"spectral"' "'

    • }
    • if (i' <nvals') {
      = if (1871 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 578 + length("tableau"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((590 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"' "'

    • }
    • if (i' <nvals') {
      = if (1872 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 590 + length("veggiesa"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((603 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'`"veggiesa"' "
      '

    • }
    • if (i' <nvals') {
      = if (1873 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 603 + length("veggiese"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((616 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'"veggiesa"'
      "veggiese"' "'

    • }
    • if (i' <nvals') {
      = if (1874 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 616 + length("ylgn"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((625 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'"veggiesa"'
      "veggiese"'`"ylgn"' "'

    • }
    • if (i' <nvals') {
      = if (1875 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 625 + length("ylgnbu"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((636 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'"veggiesa"'
      "veggiese"'"ylgn"' "ylgnbu"' "'

    • }
    • if (i' <nvals') {
      = if (1876 < 1877) {
    • local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      = local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"'"')

    • local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      = local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
    • }
    • else {
      local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') local cmd "local vals `"vals'"=varlist'[`i']'"'"'"'
      }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 636 + length("ylorbr"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((647 + 47) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'"veggiesa"'
      "veggiese"'"ylgn"' "ylgnbu"'`"ylorbr"' "'

    • }
    • if (i' <nvals') {
      = if (1877 < 1877) {
      local cmdlen = length("local vals"vals'"=varlist'[i']'"'sep'"

      '"')
      local cmd "local vals"vals'"=varlist'[i']'"'sep'"'"'
      }

    • else {
    • local cmdlen = length("local vals \"vals'"=varlist'[i']'"'"'"') = local cmdlen = length("local vals"vals'"=varlist'[i']'"'"'"')
    • local cmd "local vals \"vals'"=varlist'[i']'"'"'"' = local cmd "local vals"vals'"=varlist'[i']'"'"'"'
    • }
    • local maclen = maclen' + length("=varlist'[i']'"') + length("`sep'"')
      • 4
        = local maclen = 647 + length("ylorrd"') + length(" "') + 4
    • if ((maclen' +cmdlen') > `c(macrolen)') {
      = if ((658 + 42) > 645200) {
      di as err "macro length exceeded"
      exit 1000
      }
    • else cmd' = else local vals""accent"'"activitiesa"' "activitiest"'"blues"' `"bra

      ndsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category10 "' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"drin kse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"' "
      ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'" orrd"' "paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn"
      '"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylgn
      "'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'"veggiesa"'
      "veggiese"'"ylgn"' "ylgnbu"'"ylorbr"' "ylorrd"'"'

    • }
    • }
    • }
    • di as txt "vals'"'
      = di as txt ""accent"' "activitiesa"'"activitiest"' "blues"'"brandsa"'

      "brandse"'"brbg"' "bugn"'"bupu"' "carsa"'"carse"' "category10"'"c
      ategory20"' "category20b"'"category20c"' "dark2"'"drinksa"' "drinkse"' "featuresa"' "featurest"'"fooda"' "foode"'"fruita"' "fruite"'"ggplot
      2"' "gnbu"'"greens"' "greys"'"mdebar"' "mdepoint"'"oranges"' "orrd"' "paired"' "pastel1"'"pastel2"' "piyg"'"prgn"' "pubu"'"pubugn"' "pu or"'"purd"' "purples"'"rdbu"' "rdgy"'"rdpu"' "rdylbu"'"rdylgn"' "r eds"'"set1"' "set2"'"set3"' "spectral"'"tableau"' "veggiesa"'"veggi
      ese"' "ylgn"'"ylgnbu"' "ylorbr"'"ylorrd"'"'

    • return local levels "vals'"'
      = return local levels ""accent"' "activitiesa"'"activitiest"' "blues"'

      "brandsa"' "brandse"'"brbg"' "bugn"'"bupu"' "carsa"'"carse"' "catego ry10"'"category20"' "category20b"'"category20c"' "dark2"'"drinksa"' " drinkse"'"featuresa"' "featurest"'"fooda"' "foode"'"fruita"' "fruite" '"ggplot2"' "gnbu"'"greens"' "greys"'"mdebar"' "mdepoint"'"oranges"
      ' "orrd"'"paired"' "pastel1"'"pastel2"' "piyg"'"prgn"' "pubu"'"pub
      ugn"' "puor"'"purd"' "purples"'"rdbu"' "rdgy"'"rdpu"' "rdylbu"'"rd
      ylgn"' "reds"'"set1"' "set2"'"set3"' "spectral"'"tableau"' "veggiesa "'"veggiese"' "ylgn"'"ylgnbu"' "ylorbr"'"ylorrd"'"'

    • if "`local'" != "" {
      = if "palettes" != "" {
    • c_local local'"vals'"' = c_local palettes""accent"'"activitiesa"' "activitiest"'"blues"' `"br

      andsa"'"brandse"' "brbg"'"bugn"' "bupu"'"carsa"' "carse"'"category1 0"' "category20"'"category20b"' "category20c"'"dark2"' "drinksa"'"dri nkse"' "featuresa"'"featurest"' "fooda"'"foode"' "fruita"'"fruite"'
      "ggplot2"'"gnbu"' "greens"'"greys"' "mdebar"'"mdepoint"' "oranges"'"orrd"'"paired"'"pastel1"' "pastel2"'"piyg"' "prgn"'"pubu"' "pubugn
      "'"puor"' "purd"'"purples"' "rdbu"'"rdgy"' "rdpu"'"rdylbu"' "rdylg
      n"'"reds"' "set1"'"set2"' "set3"'"spectral"' "tableau"'"veggiesa"' "veggiese"'"ylgn"' "ylgnbu"'"ylorbr"' "ylorrd"'"'

    • }
      ------------------------------------------------------------- end levelsof ---
  • qui: mata: brewc = brewcolors()
    file c:\ado\personal/brewcolors/colordb.dta not found
    stata(): 3598 Stata returned error
    brewcolors::new(): - function returned error
    brewcolors(): - function returned error
    : - function returned error
    ------------------------------------------------------------- end brewscheme ---
    r(2);

.

@tiemann
Copy link

tiemann commented Jan 19, 2016

Oh and yes, the filepath is writable and I'm opening Stata with a right-click >> "Run as administrator"

@wbuchanan
Copy link
Owner

It may be an issue with the older and current versions being installed. Try:

// Will return the indices used by Stata to track packages
ado, find(brewscheme)

// You'll have to do this manually, but then it will be something like
ado uninstall [##]

Replace the [##] with the number returned from the first command (along with the square brackets). This will allow you to uninstall all of the version you have on your computer. Then,

net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/")

Should install the newest version for you. Try using

brewcolordb, ref

To force it to overwrite the file it says it can't read. Are you able to load the file C:/ado/personal/brewcolors/colordb.dta? brewcolors() is a Mata object that gets used by brewscheme/brewtheme to transform the RGB color space and/or look up existing values to write to the additional files that get created for the forms of color sight impairments.

@wbuchanan
Copy link
Owner

And as I recently found out, admin rights don't always mean the same thing on Windows. Recently had an issue erasing a file from disk (I have local admin and created the directory in which the file was located), and the system admin couldn't erase it either (even with admin credentials). It's better to verify that the file/subdirectory is writable (haven't tried it with a directory but you may be able to use the filesys command to check the directory permissions, and if not could certainly check the permissions on the file itself).

@tiemann
Copy link

tiemann commented Jan 19, 2016

It shouldn't be due to previous installations. I used

adopath ++ ...

To set the C:\ado\personal folder as the first ado folder to check. However, a net install to this folder doesn't create the .dta file.

Also, I don't think it's a permission issue. I do have write access. Second, (after the above) I've created a new ado folder in a location that is definitely not considered a system location (I wouldn't know why c:/ado should be protected, but anyways). I've then set this folder as the first folder for ados, using adopath ++ - again. A subsequent net install to this folder does not create the .dta file. Any other ideas?

@wbuchanan
Copy link
Owner

It can be due to previous installations when there are multiple versions installed. Did you verify that you have write permissions enabled on the subdirectory? http://answers.microsoft.com/en-us/windows/forum/windows_10-security/folder-and-file-permissions-changed-in-windows-10/38bb51a5-8cfb-4349-b635-0fdae1287eb0?auth=1 There is no need to use adopath ++.

// Will return the indices used by Stata to track packages
ado, find(brewscheme)

// You'll have to do this manually, but then it will be something like
ado uninstall [##]

// Reinstall the most current version
net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/")

// This creates the .dta file that the mata function could not find.
brewcolordb, ref

I do not have access to Windoze 10 and have no plans to purchase it, but given that file permissions were an issue for another Windoze 10 user previously I can only assume that it is the result of a similar issue. The .pkg file handles the installation of the program files to the appropriate destinations so there is no reason to attempt to override this and it makes it more difficult to diagnose the issue. If you follow my earlier recommendations (e.g., remove all versions of brewscheme that you have currently installed and do a fresh install from the location above) I'd be in a better position to try diagnosing what could potentially be going wrong on your system. As mentioned earlier in this thread the programs create subdirectories and files in C:/ado/personal, so if there are file permission issues with that directory it will cause the programs to malfunction.

@tiemann
Copy link

tiemann commented Jan 20, 2016

Sorry, I'll have to give up. I've tried one more time, following the above instructions but no luck. I won't need this urgently before September and won't be able to look into this further - my apologies. My last error message is r(603) [search r(603), local]; so I think you must be right about permissions. Thanks again for all your work and support with this!

@wbuchanan
Copy link
Owner

Did you run into the error when running the command brewcolordb, ref or did it occur at some point after that? You can check the file attributes fairly quickly with one of the programs that is bundled with brewscheme:

. filesys `c(sysdir_personal)'b, attr dis


----------------------------------------------------------------------------------------------------
    Attribute                File Attribute Value
----------------------------------------------------------------------------------------------------
    Created Date             07jan2016 09:21:51
    Modified Date            10jan2016 04:46:59
    Last Accessed Date       16jan2016 04:52:07
    Absolute File Path       /Users/billy/Library/Application Support/Stata/ado/personal/b
    Canonical File Path      /Users/billy/Library/Application Support/Stata/ado/personal/b
    Parent Path              /Users/billy/Library/Application Support/Stata/ado/personal
    File Name                b
    Is Symbolic Link         false
    Is Regular File          false
    Is Executable            true
    Is Hidden                false
    Is Readable              true
    Is Writable              true
----------------------------------------------------------------------------------------------------

So I can verify that on my system (which is a Mac running OSX) has the write permissions enabled for the path of interest. Additionally, if you need to modify the permissions you can do that as well

// Should display the current attributes
filesys `c(sysdir_personal)'b, attr dis

// Should make the directory writable for your user or you can add the option global to make it globally writable
filesys `c(sysdir_personal)'b, w(on) dis

It could also be an issue related to starting the Stata process as an admin while the path is owned by a different user account. In either case, this should help a bit. The error code you mentioned above could be cause either by file system permissions or an unclosed file connection. To close any open file connections you can use file close _all and that would eliminate that part of things.

@tiemann
Copy link

tiemann commented Jan 20, 2016

The error occurs when running brewcolordb, ref. However, filesys `c(sysdir_personal)'b, attr dis also gives me the following:

java.lang.UnsupportedOperationException
at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:192)
at java.nio.file.Files.readAttributes(Files.java:1737)
at org.paces.Stata.FileCreated.setPosixAttributes(FileCreated.java:178)
at org.paces.Stata.FileCreated.(FileCreated.java:121)
at org.paces.Stata.StataFileSystem.fileCreated(StataFileSystem.java:24)

@wbuchanan
Copy link
Owner

@tiemann Just created a new issue for the issue you had with the filesys command and will be pushing an update shortly. It isn't actually a Java issue, but an error in the ordering of some of the code in the .ado wrapper around the Java plugin. If you wanted to fix it temporarily on your system, you can:

findfile filesys.ado
doedit `r(fn)'

Once in the file, you'll want to move lines 50-51 up to line 41 leaving everything else in place. I inserted some additional code between if and else single line statements and never moved the else statement back to the syntactically correct location.

@tiemann
Copy link

tiemann commented Jan 20, 2016

This indeed fixed filesys:


Attribute                File Attribute Value

Created Date             19jan2016 16:34:17
Modified Date            20jan2016 11:49:46
Last Accessed Date       20jan2016 11:49:46
Absolute File Path       C:\ado\personal\b
Canonical File Path      C:\ado\personal\b
Parent Path              C:\ado\personal
File Name                b
Is Symbolic Link         false
Is Regular File          false
Is Executable            true
Is Hidden                false
Is Readable              true
Is Writable              true

Even though I still get the same r(603) (after another complete reinstall and after then fixing filesys as instructed)

. brewcolordb, ref
This program needs to clear all data currently in memory. If this is ok hit enter, otherwise enter the l

etter 'n' and hit enter to exit the program without clearing data from memory..
(142 real changes made)
file c:\ado\personal/brewcolors/colordb.dta could not be opened

@wbuchanan
Copy link
Owner

@tiemann New fix is all set in the distribution and on Windows 7 will look something like:

. net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") replace
checking brewscheme consistency and verifying not already installed...
installing into c:\ado\plus\...
installation complete.

. filesys `c(sysdir_personal)'b, attr dis


--------------------------------------------------------------------------------
    Attribute                File Attribute Value
--------------------------------------------------------------------------------
    Created Date             04nov2015 10:12:14
    Modified Date            07dec2015 16:20:15
    Last Accessed Date       07dec2015 16:20:15
    Absolute File Path       c:\ado\personal\b
    Canonical File Path      C:\ado\personal\b
    Parent Path              c:\ado\personal
    File Name                b
    Is Symbolic Link         false
    Is Regular File          false
    Is Executable            true
    Is Hidden                false
    Is Readable              true
    Is Writable              true
--------------------------------------------------------------------------------

To give you an example of some of the files/subdirectories that get created:

. filesys `c(sysdir_personal)'b/theme, attr dis


--------------------------------------------------------------------------------
    Attribute                File Attribute Value
--------------------------------------------------------------------------------
    Created Date             07dec2015 16:20:15
    Modified Date            07jan2016 11:36:52
    Last Accessed Date       07jan2016 11:36:52
    Absolute File Path       c:\ado\personal\b\theme
    Canonical File Path      C:\ado\personal\b\theme
    Parent Path              c:\ado\personal\b
    File Name                theme
    Is Symbolic Link         false
    Is Regular File          false
    Is Executable            true
    Is Hidden                false
    Is Readable              true
    Is Writable              true
--------------------------------------------------------------------------------


. ls C:/ado/personal/b/theme/
  <dir>   1/07/16 11:36  .                 
  <dir>   1/07/16 11:36  ..                
  35.9k  12/07/15 16:20  theme-ggplot2.theme
  37.0k  12/07/15 16:20  theme-ggplot2_achromatopsia.theme
  36.9k  12/07/15 16:20  theme-ggplot2_deuteranopia.theme
  36.8k  12/07/15 16:20  theme-ggplot2_protanopia.theme
  36.8k  12/07/15 16:20  theme-ggplot2_tritanopia.theme
  35.9k   1/07/16 11:36  theme-ggtheme.theme
  37.0k   1/07/16 11:36  theme-ggtheme_achromatopsia.theme
  36.9k   1/07/16 11:36  theme-ggtheme_deuteranopia.theme
  36.8k   1/07/16 11:36  theme-ggtheme_protanopia.theme
  36.8k   1/07/16 11:36  theme-ggtheme_tritanopia.theme

@tiemann
Copy link

tiemann commented Jan 20, 2016

Confirming that this new installation fixes filesys (just as posted a minute ago, above), but that I get the same error (just as posted a minute ago, above). Also, I don't get any subdirectories created in C:\ado\personal\b

@wbuchanan
Copy link
Owner

@tiemann to make it easier to locate any additional comments/fixed, you should probably move things over to #36. I just deleted all of the subdirectories and files created by the programs and uninstalled everything then ran things from installation through the generation of your scheme file and even tested the scheme file quickly and it worked fine on Windoze 7.

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

No branches or pull requests

3 participants