unexpected symbolunexpected end of input

Posted Data+Science+Insight

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unexpected symbolunexpected end of input相关的知识,希望对你有一定的参考价值。

unexpected symbol、unexpected end of input

问题:

# 不是一个合法的表达式(expression)

parse(text = "2^")

parse(text = "2a")                
# Unexpected symbol

解决:

parse(text = "2^2") 

parse(text = "2*a")

完整错误:

Error in parse(text = "2a"): <text>:1:2: unexpected symbol
1: 2a
     ^
Traceback:

1. parse(text = "2a")
Error in parse(text = "2^"): <text>:2:0: unexpected end of input
1: 2^
   ^
Traceback:

1. parse(text = "2^")

参考:parse, deparse & expression Functions in R | Handle Character String & Expression

参考:statisticsglobe.com

参考:R

以上是关于unexpected symbolunexpected end of input的主要内容,如果未能解决你的问题,请参考以下文章

Import Unexpected identifier + SyntaxError: Unexpected string

python IndentationError: unexpected indent

“set_unexpected”在 VC2010 中不起作用?

com.fasterxml.jackson.core.JsonParseException: Unexpected character

VMWare vCenter Converter 迁移错误Unexpected Exception

解决Linux下编译.sh文件报错 unexpected operator Syntax error: word unexpected