similar to: Factor names & levels

Displaying 20 results from an estimated 13000 matches similar to: "Factor names & levels"

2018 Mar 24
1
Function 'factor' issues
I am trying once again. By just changing f <- match(xlevs[f], nlevs) to f <- match(xlevs, nlevs)[f] , function 'factor' in R devel could be made more consistent and back-compatible. Why not picking it? -------------------------------------------- On Sat, 25/11/17, Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> wrote: Subject: Re: [Rd] Function
2003 Jul 30
2
Plotting a function with curve()
Why does > curve(function(y) y^2, from=0,to=1) not work, whereas > myf <- function(y) y^2 > curve(myf, from=0,to=1) work? For the former, I get the error message Error in curve(function(y) y^2, from = 0, to = 1) : 'expr' must be a function or an expression containing 'x' I'm using R1.7.0 under Windows XP. Damon Wischik.
2003 Mar 02
2
ESS+R not closing gracefully
I am having trouble with ESS+R. I don't know if it is an ESS problem or an R problem, so I'm posting to this mailing list in the first instance. I am using R 1.6.2, Windows XP (latest updates installed), XEmacs 21.4, and ESS 5.1.21. I have experienced the same problem under Windows 2000 and recent versions of Emacs and ESS (though my current Windows XP installation is from scratch, and
2003 Jan 10
1
Superposed histograms
I woud like to plot cumulative histograms. Specifically, I have data like Sex M M F M F F M F Height 6 6.3 6.1 5.5 7.2 6.2 5.9 6.0 .... and I want to plot a histogram of the distribution of all heights, colouring the histogram bars according to sex, for example | o | oo o | o oo ** o o = observations of women | o o*o***o * = observations of
2003 Mar 10
2
Biplots
I want to plot biplots. I have seen the function biplot, but there are some extra features I would like, that I do not know how to achieve. 1. My observations, and my variables, fall into groups. Is there a way to, say, plot the observations in several different colours, according to which group the observation falls into? Similarly with the variables? I am used to the lattice idiom, in which one
2004 Apr 22
3
Trouble with HTML search engine
There have been a number of posts to this list by people having trouble with the HTML search engine. Often these troubles are caused by incorrect setups (user hasn't installed Java properly, or Java is disabled, or Javascript is disabled). Sometimes the trouble persists even when Java is installed properly. I have written an alternative HTML search engine, which is based on Javascript rather
2003 Jul 26
1
A model for disease progression
I would be grateful for advice about the following problem. It's not directly R-related, but I'm hoping that R will help me analyse the following data. I have a table which indicates the progression of a certain age-related disease. At a certain point in time, a population was sampled; and I have measurements for the age of each individual, and their disease stage. (Disease stage is an
2017 Oct 15
2
Function 'factor' issues
In R devel, function 'factor' has been changed, allowing and merging duplicated 'labels'. Issue 1: Handling of specified 'labels' without duplicates is slower than before. Example: x <- rep(1:26, 40000) system.time(factor(x, levels=1:26, labels=letters)) Function 'factor' is already rather slow because of conversion to character. Please don't add slowdown.
2003 Sep 04
3
Overlaying graphs
----- Original Message ----- From: "Richard A. O'Keefe" <ok at cs.otago.ac.nz> To: <paul at datavore.com> Sent: Thursday, September 04, 2003 2:56 AM Subject: Re: [R] Overlaying graphs > I do not know how to overlay the curve graphic on top of hist graphic. > > Do you know about the "add=TRUE" option for plot()? > > I am hoping to show visually
2003 Jan 17
2
Negative Binomial modelling
I have some data which I am trying to fit with a negative binomial distribution. I have found the glm.nb function from MASS. I have reason to believe that the mean parameter mu depends on certain factors, and that the shape parameter theta depends on others. If, say, the factors are P and Q, it might be that mu ~ P:Q and theta ~ P (where mu ~ P:Q means that mu is a function of the pair (P,Q))
2007 Apr 17
2
format() applied to an NA character string (PR#9616)
I get strange results when I try to format() an NA character string. > x <- 'sometext' > x[1] <- NA > format(NA, width=32) # displays sensibly, right-justified > format(x,width=32) # displays sensibly, left-justified > format(x,width=33) # displays "" > format(x,width=36) # R exits abnormally with code 5 > version platform i386-pc-mingw32
2003 Feb 01
1
Trouble with optim
I am having trouble with optim. It claims to have converged to a minimum, yet it has in the course of the optimization visited many points which are closer to optimal. I would be grateful for any explanation of this behaviour. I'm trying to estimate the parameters in the model X ~ Binomial(1,p) * NegBin(mu,theta). So I define a log likelihood function, and invoke optim thus: o <- optim
2017 Nov 25
0
Function 'factor' issues
>From commits to R devel, I saw attempts to speed up subsetting and 'match', and to cache results of conversion of small nonnegative integers to character string. That's good. I am sorry for pushing, still. Is the partial new behavior of function 'factor' with respect to NA really worthy? match(xlevs, nlevs)[f] looks nice, too. - Using f <- match(xlevs, nlevs)[f]
2007 Jan 31
4
possible spam alert
The last two times I have originated message threads on R or Bioconductor I have received the message included below from someone named Patrick Connolly. Both times I was the originator of the message thread and used what I thought was a unique subject line that explained as best I could what my question was. Patrick seems to be implying that I am abusing the R and BioC help newsgroups in this
2017 Oct 21
0
Function 'factor' issues
My idea (like in https://bugs.r-project.org/bugzilla/attachment.cgi?id=1540 ): - For remapping, use f <- match(xlevs, nlevs)[f] instead of f <- match(xlevs[f], nlevs) (I have mentioned it). - Remap only if length(nlevs) differs from length(xlevs) . On use of 'order' in function 'factor' in R devel, factor.Rd still says 'sort.list' in "Details" section. My
2012 Nov 05
1
Another code to drop factor levels
I apologize if this is not appropriate for this mailing list. In R, there is already functionality to drop unused factor levels. However, I am proposing the code below that I wrote. In some occasions, it was faster than applying function 'factor'. In any case, there is no restriction for anyone to use the code below. droplevels2 <- function(x) { if (is.null(levels(x))) stop("no
2003 Jan 20
2
Adding reference lines to xyplot
I'm trying to add a set of reference lines to a multipanel xyplot xyplot(y ~ x | Visit, panel = function(x, y, ...){ panel.xyplot(x, y, ...) abline(v = c(0.5, 1)) }) However, the reference lines are different for different visits. For example, for the first 2 visits, I'd like vertical lines at x = 0.5 and 1. For visits 3 and four, I'd like vertical lines at x = 1 and 1.5. I can
2003 Sep 02
1
Hangup on save.image () / q ()
Dear all, I am doing some data handling and tabualtions and then I am using glmmPQL to fit a binomial hierarchical model (which I assign to a new object). If I do a save.image () or a q ('yes') after this, I get the following warning messages: Warning messages: 1: namespaces may not be available when loading 2: names in persistent strings are currently ignored Sometimes R seems to
2017 Oct 18
0
Function 'factor' issues
>>>>> Suharto Anggono Suharto Anggono via R-devel <r-devel at r-project.org> >>>>> on Sun, 15 Oct 2017 16:03:48 +0000 writes: > In R devel, function 'factor' has been changed, allowing and merging duplicated 'labels'. Indeed. That had been asked for and discussed a bit on this list from June 14 to June 23, starting at
2004 Jun 17
4
R help in Firefox on Windows XP
I had to reinstall my machine, so I installed Firefox 0.9 as browser I am using WinXP and R 1.9.1 beta. Now search in R html help does not work. I checked that the Java VM is working correctlt, Sun's test site says my installation is OK. Firefoxalso tells me that Applet Searchengine loaded Applet Searchengine started it just does not find anything. Does anybody know how to solve this? Erich