r - invalid 'type' (character of argument
问题描述
This is my code:
TF.vec <- c(rep("TRUE",10),rep("FALSE",10),rep("TRUE",5))
sum(TF.vec)
It gives the following error:
Error in sum(TF.vec) : invalid 'type' (character) of argument
not sure what I am needing to do in order to fix the character problem to get actual sum to equal 15 when sum() is put in
解决方案
推荐阅读
- azure - Processing Terraform output to give a list
- python - 为什么 list copy() 在 python 中为包含自身的数组添加一个额外的维度?
- css - 表单布局在 Firefox 上表现异常
- java - 使用java写入时dat文件没有更新
- c# - 我在哪里设置“ConfigureParameter”类来配置OracleByteArrayTypeMapping?
- python-3.x - Why is it not possiple to write from matplotlib import * and then matplotlib.pyplot.plot?
- python-3.x - How to display image in python Tkinter from url
- stl - Using VMTK to convert VTK into STL and vice versa
- r - 使用 cross 和 .names 进行变异,如何列出列
- javascript - 如何根据使用 angular8 的输入使输入显示为句子大小写