0

My root directory contains things like . and ,

So if I write

global root "C:/Users/Owner/0. Lyx,R/2000, AAA/"
global data1 "${root}Data\"
use ${data1}data

then it says

invalid 'Lyx'

How can I fix this problem?

user42459
  • 883
  • 3
  • 12
  • 29
  • 1
    As my answer to the other question explains, you need to use double quotes in `use` to take into account the spaces. Commas and periods have nothing to do with it. –  Dec 12 '18 at 10:10
  • @PearlySpencer I already tried double quotes but that didn't work. It seemed Stata considers `,` inside the double quotes as something non-literally-texual – user42459 Dec 12 '18 at 17:42
  • This does not make sense. On my computer with the same directory names I cannot replicate the problem. Everything works fine. –  Dec 12 '18 at 18:21
  • You need to use double quotes as follows: `use "${data1}data"` –  Dec 12 '18 at 18:22
  • Did you ever solve this? –  Jan 15 '19 at 16:39
  • @PearlySpencer Yes I think I was just mistaken in the first place. – user42459 Jan 26 '19 at 23:39

0 Answers0