Error: unexpected symbol in: " cPHQ[PHQ <= 4] <- 0 cPHQ[PHQ >= 5 and"
时间: 2023-11-22 09:54:17 浏览: 113
一个奇怪的SQL异常
这个错误是因为 R 语言中使用 and 会出现语法错误,正确的写法是使用 & 符号代替 and。你可以将代码修改为:
```
cPHQ[PHQ <= 4] <- 0
cPHQ[PHQ >= 5 & PHQ <= 9] <- 1
cPHQ[PHQ >= 10 & PHQ <= 14] <- 2
cPHQ[PHQ >= 15 & PHQ <= 19] <- 3
cPHQ[PHQ >= 20] <- 4
```
这样就能够正确运行了。
阅读全文
相关推荐
Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CXF - Service list</title></head><body>Available SOAP services:
IBgsOutServicedeclarationqureyStatusqureyDecldeclarationBgsoutDocument Endpoint address: http://sz.91etg.com:9310/etgwebservice/iBgsOut
WSDL : {http://impl.service.bgsOut.winlu.com/}BgsOutServiceImplService
Target namespace
WSDL : {http://impl.service.bgsOut.winlu.com/}BgsOutServiceImplService
Target namespace