Yes, however using caret you can do it directly
using the preProcess parameter, e.g. train(y ~., data
= train, method = "knn", preProcess = c("center", "scale")).
Hope this helps.
Eivind
On Thu, 21 Jun 2018, Jeff Reichman wrote:
R-Help
Does one need to normalize ones data is using the
grab <- function{
grid.echo()
grid.grab()
}
x <- rnorm(100, 1, 2)
y <- rnorm(100, 0, 0.5)
plot(x,y)
p <- grab()
a <- rnorm(20, 0, 1)
b <- rnorm(20, 1, 2)
plot(a, b)
q <- grab()
grid.arrange(p, q)
Best,
Eivind K. Dovik
Bergen, NO
__
On Fri, 4 May 2018, Allaisone 1 wrote:
Hi all ,
I have a dataframe (Hypertension) with following headers :-
Hypertension
ID Hypertension(before drug A) Hypertension(On drug A)On drug B?
Healthy diet?
1160
ype <- c(type, rep(names(thelist)[i], sapply(thelist, nrow)[i]))
}
# Creating the data frame
df <- data.frame(type, do.call(rbind.data.frame, c(thelist, make.row.names
= FALSE)))
df
Kind regards,
Eivind K. Dovik
Bergen, NO
--
Kevin E. Thorpe
Head of Biostatistics, Applied Health Research Cent
You may also want to check this out:
plot(ttt, type = "p")
points(ttt, col = ifelse(ttt < 8, "black", "red"))
Eivind K. Dovik
Bergen, NO
On Tue, 1 May 2018, Christopher W Ryan wrote:
Excellent! Worked like a charm. Thanks.
--Chris Ryan
On Tue, May 1
Many thanks in advance.
regards,
Tito
[[alternative HTML version deleted]]
Dear Tito,
Please provide your R-code so we can reproduce your data (and your
setdt-error).
Best,
Eivind K. Dovik
Bergen, NO
__
R-help@r-project.org mail
6 matches
Mail list logo