在dplyr管道中使用mutate和公式计算新值

时间:2018-10-09 06:27:38

标签: r dplyr mutate

如何使用mutate和例如dplyr管道计算新值。 stat_poly_eq?

以下代码生成一个绘图,其中包含每个构面内lm的公式。绘制前是否可以使用result = text_string.replace('-\n', '-') 中的公式计算新的y?

func addDashedBorder() {

    let color = UIColor.red.cgColor
    shapeLayer = CAShapeLayer()
    let frameSize = self.bounds.size
    let shapeRect = CGRect(x:0 , y: 0, width: frameSize.width, height: frameSize.height)

    shapeLayer.frame = shapeRect
    shapeLayer.position = CGPoint(x: frameSize.width/2, y: frameSize.height/2)
    shapeLayer.fillColor = UIColor.clear.cgColor
    shapeLayer.strokeColor = color
    shapeLayer.lineWidth = 2
    shapeLayer.lineJoin = CAShapeLayerLineJoin.round
    shapeLayer.lineDashPattern = [6,3]
    shapeLayer.path = UIBezierPath(roundedRect: self.frame, cornerRadius: 5).cgPath

    self.layer.addSublayer(shapeLayer)
}

0 个答案:

没有答案