Some error occured while loading page for you. Please try again.
We use cookies to ensure you have the best browsing experience on our website.
Please read our cookie policy for more information about how we use cookies.
On strsplit, actually scan does the same out of box:
nums <- suppressWarnings(readLines(file("stdin")))
fn <- scan(text=nums[1])
f <- fn[1]
n <- fn[2]
On the coefficients, there's no need to extract anything: as soon as you've got the fitted model, you can use predict to apply it to a data frame of queries.
On printing, StackOverflow users suggest something along the lines of,
On
strsplit
, actuallyscan
does the same out of box:On the coefficients, there's no need to extract anything: as soon as you've got the fitted model, you can use
predict
to apply it to a data frame of queries.On printing, StackOverflow users suggest something along the lines of,
Frankly, I don't really understand how
cat
andwrite.table
interact here, but it seems to work just fine.Add Reply Preview cancel