Unexpected token in variable name

时间:2016-02-12 20:12:07

标签: r token

I would like to recode a variable (Pr(>|t|)_oldvar) which contains a ">")

mydata$newvar[mydata$Pr(>|t|)_oldvar>0,10] <- 0

I get an error that there is an unexpected '>'.

I get the same error when I try to rename the variable.

Any idea's on how to get the '>|t|' out of the variable name?

1 个答案:

答案 0 :(得分:0)

This might be too simple of an approach, but have you tried using the names function? Something like the following: $(document).ready(function() { var $window = $(window); var canvas = $('canvas')[0]; var checkWidth = function() { var windowsize = $window.width(); if (windowsize > 768) { canvas.height = 80; } }; checkWidth(); $(window).resize(checkWidth); });