Search results

  1. J

    Importance of vars in linear regression (R)

    I have a question that is and R question and a statistical question: I am analysing sales of a retailer. These sales are related to some vars: var1, var2, var3.., varN Most of the vars are continuos. I want to analyze the relationship between sales and the vars. I have made a linear...
  2. J

    Problems with scan function

    Hi, I am having problems with scan() function, using it to get values from console. The above code doesn't work properly. It doesn't stop after scan() function. Is there anything wrong?, can anybody help me? funent <- function(){ val <- scan(,,1) return(as.character(val)) }...
  3. J

    Problems plotting a data.frame

    Hi, I am trying to do a simple graph with plot() function. When I do the plot with two columns of the data.frame the style options dosen't work. But in lines() function it works well. I don't jnow th reason. Is there something wrong in my code. dataf <-...
  4. J

    Apply function in R

    Hi, I want to apply a user defined function over a matrix object. I don't have desired results my input is a 4x4 matrix and I want to get as output a 4x4 matrix with the transformation defined in mapfun function Where is my error? Thanks in advance --- mapfun <- function(val){ if...