Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将一个包含很多变量(〜250)的数据集导入Stata,其中大部分需要作为字符串读入Stata,所以我在徘徊,如果不是写一个痛苦的长字典文件,我可以告诉Stata将所有变量读取为字符串,然后根据需要返回并将少数变量转换回数字。
你当然可以试试。Stata 有一个destring旨在尽可能智能的命令,但您可能需要做的不仅仅是destring, replace.
destring
destring, replace