我正在使用大型数据矩阵,大部分时间我都必须查看特定列中的所有数据(对于PCA)。
我已经成长为爱class PassThroughTextView: UITextView {
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
if let next = next {
next.touchesBegan(touches, with: event)
} else {
super.touchesBegan(touches, with: event)
}
}
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
if let next = next {
next.touchesEnded(touches, with: event)
} else {
super.touchesEnded(touches, with: event)
}
}
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
if let next = next {
next.touchesCancelled(touches, with: event)
} else {
super.touchesCancelled(touches, with: event)
}
}
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
if let next = next {
next.touchesMoved(touches, with: event)
} else {
super.touchesMoved(touches, with: event)
}
}
}
// In case you want to do anything with the URL or textView in your tableViewCell...
class TableViewCell: UITableViewCell, UITextViewDelegate {
@IBOutlet var textView: PassThroughTextView!
func textView(textView: UITextView, shouldInteractWithURL URL: NSURL, inRange characterRange: NSRange) -> Bool {
println("textView shouldInteractWithURL")
return true
}
}
。但是,这对我来说很麻烦,因为我每次都要在控制台上键入它。我是否可以告诉R将所有控制台输出包装为默认使用> page(bigmatrix, method="print")
?
答案 0 :(得分:1)
我认为最简单的选择是编写一个函数来执行此操作并将其放入启动.Rprofile.
然后您可以轻松地使用p(bigmatrix)
之类的内容。
我通过将以下内容放在我的.Rprofile文件的末尾(位于主目录中 - 在Windows中是与您的用户名关联的Documents目录)来测试它。它运作良好。
p <- function (x){
page(x, method = "print")
}