Question: I am trying to run this code in R program, but i keep getting an error saying Warning message: In structure(c(), class = c(class(x), class(y)))
I am trying to run this code in R program, but i keep getting an error saying
Warning message: In structure(c(), class = c(class(x), class(y))) : Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead.
what is the issue?
s11 <- c(binary(4, mb=7), binary(0, mb=7), binary(6, mb=7), binary(5, mb=7) , binary(7, mb=7), binary(1, mb=7), binary(3, mb=7), binary(2, mb=7)) s11
s12 <- c(binary(5, mb=7), binary(3, mb=7), binary(0, mb=7), binary(7, mb=7) , binary(6, mb=7), binary(2, mb=7), binary(1, mb=7), binary(4, mb=7)) s12
S11_function <- function(values){ b <- values tempVal <- unbinary(substr(b, nchar(b)-3+1, nchar(b))) tempVal b <- strsplit(b, "") b <- unlist(b) b <- as.integer(b) b if (b[1] == 0) { tempRet <- s11[tempVal] print (tempRet) } if (b[1] == 1){ tempRet <- s12[tempVal] print(tempRet) } } S11_function('0111')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
