问题描述
我无法为以下问题找到正确的代码:
我的数据表有多个列代表不同的变量,代表重复测量。我想总结一下 R 中的重复测量
from PyQt5 import QtWidgets
from PyQt5.QtCore import QThread
from Somewhere import Ui_MainWindow
class MainWindow(QtWidgets.QMainWindow,Ui_MainWindow):
def __init__(self,*args,**kwargs):
super(MainWindow,self).__init__(*args,**kwargs)
self.setupUi(self)
self.showFullScreen()
# Task and thread instantiated. Task is then assigned to thread.
self._thread = QThread()
self._cam_prev = CameraThread()
self._cam_prev.moveToThread(self._thread)
# Signals are connected.
self._cam_prev.signal_new_frame.connect(self.update_image) # UI signal to show image on QLabel
self._thread.started.connect(self._cam_prev.run) # Trigger task's run() when thread is ready
self._thread.start()
@pyqtSlot(QPixmap)
def update_image(self,q_pixmap: QPixmap):
self.q_cam_preview.setPixmap(q_pixmap)
在第一步中,我将表格分组为
library(data.table)
data.table(structure(list(exp = c("480 p36","480 p36","480 p36"),well = c("A","A","A"),col = c("001","002","003","004","005","006"),`T peak` = c(1.63,1.67,1.56,1.47,1.59,1.55),`T rise` = c(0.2,0.18,0.13,0.14,0.17),`T fall` = c(0.13,0.16,0.15,0.23,0.2),TCT = c(0.86,0.77,0.73,0.76,0.71,0.62),`D peak` = c(0.02,0.02,0.01,0.01),`D valley` = c(0,0),`D high` = c(0.01,`D low` = c(0,AUC = c(0.01,Power = c(0.01,CR = c(0.1,0.12,0.07,0.05),RR = c(-0.1,-0.11,-0.12,-0.04,-0.04)),row.names = c(NA,-6L),class = "data.frame"))
我做了一个可变向量:
group <- group_by(output,col)
我想总结按列 variables <- colnames(group[,4:15],do.NULL = TRUE)
和列分组的每个变量
col
。尝试对平均值、SEM 和计数等数据进行汇总。
它适用于
exp
但我认为用变量向量替换每个列名会更好。但这不起作用。 有什么建议吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)