Hi Phil,
Sorry it's not in the environment you are using, but perhaps this will help:
taby<-table(df$y)
ynames<-names(taby)
for(yval in 1:length(taby)) {
if(taby[yval] > 1) {
cat(paste(ynames[yval],1:taby[yval],sep=""),"\n")
df$y[which(df$y == ynames[yval])]<-paste(ynames[yval],1:taby[yval],s
My general approach is to import data without letting the import convert to
factors. Then I explicitly create my factors with the levels I want them to
have, with explicit vectors specified for the levels. Fixing this after the
analysis is possible but a headache.
On March 28, 2020 5:46:25 PM P
I have a problem involving inefficient coding. My code works, but in my
actual application it takes a very long time to execute. I have included
a reprex here that uses the same code, but with a much smaller-scale
application.
The data frame I am working with (df in my reprex) is in long form
I have an application in which I want to plot points with different
colours and symbols to distinguish (three) types of point. I thought I
had it figured out, mostly by a trial-and-error approach and by
simple-mindedly following instructions from others, without (sad to say)
really understan
Dear R-experts,
Here below my "toy" reproducible example showing many warnings and an error
message. What I am interested in is the error message.
Of course I can access and view the results doing : summary(results$t) to give
me an idea of what is going on. But I don't know how to correct/solve
Rolf:
This behavior has nothing to do with S3 methods:
> f <- function(x,y,...) xyplot(y~x, col = "red",...)
> x <- 1:5; y <- runif(5)
> z <- f(x,y)
> z$call
xyplot(x, y)
I have **not** studied the lattice code, but assuming that it is using
match.call() to get the call it returns, it looks like
If you want to do a fancy matrix operation, you may need to invent the
wheel yourself. Rmpfr only supports limited matrix operations. There may
exist some C++ library that can do this job, I will suggest finding a
matrix library whose elements are of a template type, then combine it with
a multi-pr
7 matches
Mail list logo