我需要将一个填充日期的函数应用到我从目录中导入的所有文件,在运行代码时它会向我显示以下错误:" $运算符对原子向量无效" ,帮助或建议我是R的新人感谢
<table id ="tableId" >
<tbody>
<tr>
<th>Heading 1 </th>
<th>Heading 2 </th>
</tr>
<tr>
<td><textarea class="saveTxt"></textarea></td>
<td><textarea class="saveTxt"></textarea></td>
</tr>
</tbody>
</table>
<input type="button" value="Copy table" onclick="selectElementContents(document.getElementById('tableId') );">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
<script>
jQuery(document).ready (function () {
saveDataToLocal();
});
</script>
<script type="text/javascript">
/* copy table content */
function selectElementContents(el) {
var body = document.body, range, sel;
if (document.createRange && window.getSelection) {
range = document.createRange();
sel = window.getSelection();
sel.removeAllRanges();
try {
range.selectNodeContents(el);
sel.addRange(range);
} catch (e) {
range.selectNode(el);
sel.addRange(range);
}
document.execCommand("copy");
} else if (body.createTextRange) {
range = body.createTextRange();
range.moveToElementText(el);
range.select();
range.execCommand("Copy");
}
}
function saveDataToLocal() {
var text = document.querySelectorAll('.saveTxt');
/* code to save data to local storage*/
}
</script>