'strwrap' should wrap at the target column, so I think it's behaving
correctly. You could do + 1 if you're expecting it to wrap immediately
after the target column.
As far as splitting while trying to minimize a penalty, I don't think
strwrap can do that, and I don't know of any packages that do
Thank you Andrew.
I will explore this function more, although I am struggling to get it to
work properly:
strwrap("Abc. B. Defg", 7)
# [1] "Abc." "B." "Defg"
# both "Abc. B." and "B. Defg" are 7 characters long.
strwrap(paste0(rep("ab", 7), collapse=""), 7)
# [1] "ababababababab"
Can I
I think what you're looking for is 'strwrap', it's in package base.
On Tue, Sep 28, 2021, 22:26 Leonard Mada via R-help
wrote:
> Dear R-Users,
>
>
> Does anyone know any package or library that implements functions for
> word wrapping?
>
>
> I did implement a very rudimentary one (Github link
Dear R-Users,
Does anyone know any package or library that implements functions for
word wrapping?
I did implement a very rudimentary one (Github link below), but would
like to avoid to reinvent the wheel. Considering that word-wrapping is a
very common task, it should be available even in
tools:::prepare2_Rd contains the lines
## FIXME: we no longer make any use of \Rdversion
version <- which(sections == "\\Rdversion")
if (length(version) > 1L)
stopRd(Rd[[version[2L]]], Rdfile,
"Only one \\Rdversion declaration is allowed")
so I am guessing you
I just noticed that a help file in one of my packages contains,
as the second line (just after the \name{ } macro), the line
> \Rdversion{1.1}
I have no idea how it got there. I can find no reference to this
macro in WRE, but by doing some groping, err, grepping around I have
discovered its
Hi Rodney,
Just a point of clarification, it is completely OK for R-GSOC students to
write non-R code, and that happens every year (most common other languages
are probably FORTRAN/C/C++ and JavaScript but ESS/elisp should be fine
too). See non-R languages column in last year's coding projects
Hi Toby:
Well that is very generous. But ESS is not written in R.
So I don’t think this would work. Also getting another
person to file FSF paper work can be painful. For
example, the student’s employer is likely a university
who would own their code. Typically you have to
get them to give
I do not know that package so cannot help with that but the dataset did
not come through. This mailing list is quite restrictive in what sorts
of attachment it allows so I suggest trying something like a .csv file
or a .txt file.
Michael
On 28/09/2021 10:37, 宋启发 wrote:
I am using your
I am using your excellent R package eRM to solve a questionaire survey data. I
meet a strange issue when using RSM function. This RSM runs well using sample
data.
There is a test data like this:
'data.frame': 1669 obs. of 7 variables:
$ X1: num 2 2 3 3 2 3 4 4 3 2 ...
$ X2: num 4 3 3
Buenas
Si el data.frame, o cualquier otro objeto con dos dimensiones es d,
d$Localidad[is.na(d$Localidad)] <- d$Provincia[is.na(d$Localidad]]
O bien en dos pasos:
index <- is.na(d$Localidad)
d$Localidad[index] <- d$Provinica[index]
Un saludo
--
Buenos días. Una pregunta que supongo sencilla pero a la que no le encuentro
solución: ¿como reemplazo los valores NA por el que figura en otra columna?
Supongamos que tengo:
Localidad. Provincia
Argamasilla Ciudad Real
NA Cuenca
NA Albacete
Quisiera
12 matches
Mail list logo