我正在尝试为数据集的列名称创建一个向量。我用记事本打开了.csv文件。
/ app / csrf /; / app / xss /; / http / https_redirect /; / http / vulnerability / apache_expect_xss /; / http / vulnerability / apacheusers /; / http / vulnerability / cgi /; / http / vulnerability / clientaccesspolicy /; / http / vulnerability / content_search /; / http / vulnerability / cookies /; / http / vulnerability / dictionary /; / http / vulnerability / dir_traversal /; / http / vulnerability / docker_registry /; / http / vulnerability / domino /; / http / vulnerability / drupal /; / http / vulnerability / embedded /; / http / vulnerability / headers /; / http / vulnerability / httpoptions /; / http / vulnerability / ms10_070 /; / http / vulnerability / multiple_index /; / http / vulnerability / negotiate /; / http / vulnerability / origin_reflection /; / http / vulnerability / outdated /; / http / vulnerability / put_del_test /; / http / vulnerability / shellshock /; / http / vulnerability / siebel /; / http / vulnerability / site_files /; / http / vulnerability / strutshock /; / malware / google /; / rdp / enumeration /;/ smtp / open_relay / domain /; / ssh / auth_methods /; / ssl / cert /; / ssl / ciphers /; / ssl / mixed /; / tcp / timestamp /
将所有列复制到单词。之后,我改变了所有; 符号到“”符号组。
“ / app / csrf /”,“ / app / xss /”,“ / http / https_redirect /”,“ / http / vulnerability / apache_expect_xss /”,“ / http / vulnerability / apacheusers /”,“ / http / vulnerability / cgi /”,“ / http / vulnerability / clientaccesspolicy /”,“ / http / vulnerability / content_search /”,“ / http / vulnerability / cookies /”,“ / http / vulnerability / dictionary /”,“ / http / vulnerability / dir_traversal /”,“ / http / vulnerability / docker_registry /”,“ / http / vulnerability / domino /”,“ / http / vulnerability / drupal /”,“ / http / vulnerability / embedded /”,“ / http / vulnerability /”标头/”,“ / http / vulnerability / httpoptions /”,“ / http / vulnerability / ms10_070 /”,“ / http / vulnerability / multiple_index /”,“ / http / vulnerability / negotiate /”,“ / http / vulnerability / origin_reflection /”,“ / http / vulnerability / outdated /”,“ / http / vulnerability / put_del_test /”,“ / http / vulnerability / shellshock /”,“ / http / vulnerability / siebel /”,“ / http / vulnerability / site_files /”,“ / http / vulnerability / strutshock /”,“ / malware / google /”,“ / rdp / enumeration /”,“ / smtp / open_relay / domain /”,“ / ssh / auth_methods /”,“ / ssl / cert /”,“ / ssl / ciphers /”,“ / ssl / mixed /”,“ / tcp / timestamp /”
最后一本,我将此列复制到R
namelist <- c(“/app/csrf/” , “/app/xss/” , “/http/https_redirect/” , “/http/vulnerability/apache_expect_xss/” , “/http/vulnerability/apacheusers/” , “/http/vulnerability/cgi/” , “/http/vulnerability/clientaccesspolicy/” , “/http/vulnerability/content_search/” , “/http/vulnerability/cookies/” , “/http/vulnerability/dictionary/” , “/http/vulnerability/dir_traversal/” , “/http/vulnerability/docker_registry/” , “/http/vulnerability/domino/” , “/http/vulnerability/drupal/” , “/http/vulnerability/embedded/” , “/http/vulnerability/headers/” , “/http/vulnerability/httpoptions/” , “/http/vulnerability/ms10_070/” , “/http/vulnerability/multiple_index/” , “/http/vulnerability/negotiate/” , “/http/vulnerability/origin_reflection/” , “/http/vulnerability/outdated/” , “/http/vulnerability/put_del_test/” , “/http/vulnerability/shellshock/” , “/http/vulnerability/siebel/” , “/http/vulnerability/site_files/” , “/http/vulnerability/strutshock/” , “/malware/google/” , “/rdp/enumeration/” , “/smtp/open_relay/domain/” , “/ssh/auth_methods/” , “/ssl/cert/” , “/ssl/ciphers/” , “/ssl/mixed/” , “/tcp/timestamp/”)
但是R不理解这个符号,并给了我意外的令牌错误。为什么?
这是因为Word使用的是大括号而不是普通的双引号。R不理解这些。尝试将以下行复制并粘贴到R控制台中(但不要运行它)
writeClipboard(gsub("”|“", "\"", readClipboard()))
现在转到Word,选择并复制文本,回到R并按回车键。现在正确的字符串在剪贴板上。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句