语法错误

时间:2017-11-24 18:12:28

标签: batch-file

我在下面列出的程序结束时遇到问题 我在CMD中输入了它 它说不正确的语法我该如何解决

dt3 <- dt2 %>%
  select(-starts_with("T")) %>%
  spread(Participant, Diff)

dt3
#    ID          A           B
# 1   1 -0.6692558 -0.07348492
# 2   2  0.3349710 -0.20949564
# 3   3 -0.2685937 -0.05019846
# 4   4  0.3103840  0.19880236
# 5   5  0.8375426  0.63109211
# 6   6 -0.8542685  0.23073450
# 7   7  0.2820178 -0.21439351
# 8   8  0.8503595  0.37773408
# 9   9  0.2235143 -0.02902127
# 10 10 -0.4978889 -0.08451214

1 个答案:

答案 0 :(得分:0)

以下两个示例可以帮助您。

...使用Set/P

:NQ2
ClS
Echo Which has more power...
Echo 1) C4
Echo 2) TNT
Set/P "logo=[1/2]?"
If "%logo%"=="1" GoTo CA2
If "%logo%"=="2" GoTo IA2
GoTo NQ2

:CA2
ClS
Echo Congrats you're correct; C4 has around 1.2 times the power of TNT.
Set/P "asd=Restart [Y/N]?"
If /I "%asd:~,1%"=="y" GoTo menu
If /I Not "%asd:~,1%"=="n" GoTo CA2
GoTo NQ3

:IA2
ClS
Echo Sorry you're incorrect; TNT has only 83%% of the power of C4.
Set/P "asd=Restart [Y/N]?"
If /I "%asd:~,1%"=="y" GoTo menu
If /I Not "%asd:~,1%"=="n" GoTo IA2

:NQ3

...还有一个使用Choice (请输入Choice/?获取命令帮助)

:NQ2
ClS
Echo Which has more power...
Echo 1) C4
Echo 2) TNT
Choice /C 12
If ErrorLevel 2 GoTo IA2

:CA2
ClS
Echo Congrats you're correct; C4 has around 1.2 times the power of TNT.
Choice /M "Restart"
If Not ErrorLevel 2 GoTo menu
GoTo NQ3

:IA2
ClS
Echo Sorry you're incorrect; TNT has only 83%% of the power of C4.
Choice /M "Restart "
If Not ErrorLevel 2 GoTo menu

:NQ3