DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR R
r - if value in a df is between two number then add 1
library(TeachingDemos) x <- c(3.2,6,7.8,1,3,2.5) x <- ifelse(2 %<% x %<% 5, -1, x)
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#df
#number
#add
ADD COMMENT
Topic
COMMENT
Name
4+1 =
Submit