Hi I have a very large txt-file (character) where I want to extract 10% of the entries and save those to another txt-file.
con1 <- file("ABC.txt", "rb") # 2,36 mio DS
dfc1<-readLines(con1, ??? ,skipNul = TRUE)#
Instead of ??? I want to have something like <10% of all data> .
So If my ABC.txt was like
" BBC Worldwide is a principle commercial arm and a wholly owned subsidiary of the British Broadcasting Corporation (BBC). The business exists to support the BBC public service mission and to maximise profits on its behalf..."
my new file should contain only 10% (random) of the words like:
" Worldwide business behalf..."
Is there a way to do that in R ?
Thank you