Displaying 3 results from an estimated 3 matches for "history2".
Did you mean:
history
2009 Feb 27
4
Optimize for loop / find last record for each person
...,1])) {
if (history[i, "person_id"] == history[i - 1, "person_id"])
history[i, "order"] = history[i - 1, "order"] + 1 # same person
else
history[i, "order"] = 1 # new person
}
# ignore all records except the last for each con_id
history2 <- subset(history, order == 1)
Andrew
2006 Apr 11
1
pattern in history
Hi,
Sometimes I need to consult the history of commands that are matching a
regex, so I modified the utils::history function for that purpose. I
found it useful.
I append the code ( I only added the two lines with #**)
Romain.
history2 <-
function (pattern="", max.show = 25, reverse = FALSE, unique =
pattern!="", ...)
{
file1 <- tempfile("Rrawhist")
savehistory(file1)
rawhist <- scan(file1, what = "", quiet = TRUE, sep = "\n")
rawhist <- rawhist[grep(p...
2016 Apr 30
1
Declaring All Variables as Factors in GLM()
Hi guys,
I am running glm(y~., data = history,family=binomial)-essentially, logistic
regression for credit scoring (y = 0 or 1). The dataset 'history' has 14
variables, a few examples:
history <- read.csv("history.csv". header = TRUE)
1> 'income = 100,200,300 (these are numbers in my dataset; however
interpretation is that these are just tags or labels,for every