similar to: masking functions

Displaying 20 results from an estimated 900 matches similar to: "masking functions"

2002 Feb 01
1
Different behaviour in Linux and Windows (PR#1293)
Hi I have written a small function to calculate distances between pairs of landmarks ('my.dist' bellow). I gave it to a colleague that works with MSWindows and the function doesn't give the right answer: R 1.4.1 for Linux: > my.dist() [1] 22 561 R 1.4.1 for Windows: > my.dist() [1] 22 560 Warning message: Replacement length not a multiple of the elements to replace in
2003 Aug 14
2
vectorization question
If you look at the structure, you'll see: > x$V4 <- 0 > str(x) `data.frame': 4 obs. of 4 variables: $ V1: int 1 2 3 4 $ V2: int 5 6 7 8 $ V3: int 9 10 11 12 $ V4: num 0 Don't know if this is the intended result. In any case, you're probably better off using data.matrix, as > data.matrix(x) V1 V2 V3 V4 1 1 5 9 0 2 2 6 10 0 3 3 7 11 0 4 4 8 12
2004 Mar 26
1
Mahalanobis
Dear all Why isn'it possible to calculate Mahalanobis distances with R for a matrix with 1 row (observations) more than the number of columns (variables)? > mydata <- matrix(runif(12,-5,5), 4, 3) > mahalanobis(x=mydata, center=apply(mydata,2,mean), cov=var(mydata)) [1] 2.25 2.25 2.25 2.25 > mydata <- matrix(runif(420,-5,5), 21, 20) > mahalanobis(x=mydata,
2002 Jan 24
1
using names inside a loop
I expected that something like > for(i in names(my.data.frame)){j <- as.name(i); print(my.data.frame$j)} should work in R (and S). There's always the possibility of using > for(i in names(my.data.frame)){print(my.data.frame[,i])} but can someone someone tell me why doesn't the 1st option work also? Thanks Alberto -- Alberto G. Murta
2000 Oct 03
1
(fwd) Re: the underscore ("_") in variable name
On Tue, 03 Oct 2000 10:55:28 +0000, Alberto Murta <amurta at ipimar.pt> wrote: > And objectively, it's a fact that "<-" >makes the code easier to read than "_". I don't follow this argument. Underscore isn't used anywhere else in the language, so when you see one, you know it's an assignment. On the other hand, both "<" and
2000 Oct 03
1
(fwd) Re: the underscore ("_") in variable name
> Date: Tue, 03 Oct 2000 14:45:32 +0000 > From: Alberto Murta <amurta at ipimar.pt> > > Duncan Murdoch wrote: > > > I don't follow this argument. Underscore isn't used anywhere else in > > the language, so when you see one, you know it's an assignment. On > > the other hand, both "<" and "-" have multiple other uses.
2004 Jun 03
5
Confidence intervals for predicted values in nls
Dear all I have tried to estimate the confidence intervals for predicted values of a nonlinear model fitted with nls. The function predict gives the predicted values and the lower and upper limits of the prediction, when the class of the object is lm or glm. When the object is derived from nls, the function predict (or predict.nls) gives only the predicted values. The se.fit and interval aguments
2004 Nov 02
2
lda
Hi !! I am trying to analyze some of my data using linear discriminant analysis. I worked out the following example code in Venables and Ripley It does not seem to be happy with it. ============================ library(MASS) library(stats) data(iris3) ir<-rbind(iris3[,,1],iris3[,,2],iris3[,,3]) ir.species<-factor(c(rep("s",50),rep("c",50),rep("v",50)))
2010 Mar 09
1
ggplot2 rose diagram
Dear R gurus - consider this plot: library(ggplot2) dat <- sample(1:8,100,replace=TRUE) smp <- ggplot(data.frame(dat), aes(x=factor(dat),fill=factor(dat))) + geom_bar(width=1) smp + coord_polar() Q1. How do I change the font size and weight of bar labels (1,2,3...)? I've been wallowing in the 'Themes' structure and I just can't figure out the correct place to change
2003 Feb 21
1
calculating mean direction (CircStats)
Hi, I've currently to work with some circular data. Unfortunately I'm not very familiar with circular statistics and would really appreciate if I could get some help concerning the CircStats package this way. My data lies in the range 0 to 2*pi, and is transformed to radians (as expected by the CircStats methods). Calculating the mean direction (circ.mean) results for some datasets in a
2002 Nov 26
2
Existence of non-vectorised functions
Dear R-Group: Recently, I ran into a problem. I was using a function called "I.1", which evaluates the first-order modified Bessel function of the first kind, in the package "CircStats". This function is not vectorized, since it uses a couple of "if" conditions. However, when I called this function with a vector argument, I got no error/warning messages in
2011 Jun 01
1
weird error from MASS::eqcsplot with postscript driver
[Env: R 2.12.2, Win XP] I'm creating figures using MASS::eqcsplot to provide equal scaling of the axes. My figures work OK when I plot to the screen, but when I try to do the same plot as a postscript file, I get an unexplicable error, > figframe() Error in if (yuin > xuin * ratio) yuin <- xuin * ratio else xuin <- yuin/ratio : missing value where TRUE/FALSE needed >
2008 Jan 24
1
A bug in circ.plot of CircStats package
Hi, i found a bug in circ.plot of CircStats package, namely that the plot ingore the datasets with value = 0. it's simple to fix it, but i cannot seem to figure out where to submit the fix. is there a official procedure of submitting bug report/patch to the contributed packages? -- View this message in context:
2000 Oct 03
1
(fwd) Re: the underscore ("_") in variable name
> From: dmurdoch at pair.com (Duncan Murdoch) > Date: Tue, 03 Oct 2000 12:31:32 GMT > > On Tue, 03 Oct 2000 10:55:28 +0000, Alberto Murta <amurta at ipimar.pt> > wrote: > > > And objectively, it's a fact that "<-" > >makes the code easier to read than "_". > > I don't follow this argument. Underscore isn't used
2003 Dec 10
4
Scatterplot axes
Please, could someone help me figure out what seems to be a very simple problem (and is still taking me hours...). I want to draw a simple scatterplot but with 'equal' axes, i.e. I want both axes to go from -3 to 3. Values for x lie between -2 and 0.5, values for y between -2.2 and 3. I have tried 'usr' and 'eqscplot' and a few other options, but it doesn't give me the
2008 Jan 08
1
Range of circular data
I want to get the minimum arc (in degrees) needed to include a set of compass directions. I would like to use the range.circular() function of the package circular, because that package understands a compass-type of angle convention, but it gives results I don't understand. Howver, I can get the correct answer in the example below, 90 degrees, using the CircStats package. How can I make the
2003 Nov 12
2
CircStats reveals underlying R bug?
circ.plot in CircStats under R 1.8.0 yields incorrect plots (easily compare hist() and rose.diag()). However, the code in circ.plot has not changed. Has anyone tracked this down yet?
2005 Sep 12
1
help for linear-circular correlation
Hi R-profs, Maybe my question is a little off topic. Could any one tell me how to calculate a linear-circular correlation coefficient and its p-values? I had a quick look at circular and CircStats packages and did not find the related function. Thanks for any kindly help. Xiaohua -- Xiaohua Dai, Dr. Centre for Systems Research, Durban Institute of Technology P.O.Box 953, Durban 4000, South
2009 Aug 05
1
Decision boundaries for lda function?
Hi, I am using the lda function from the MASS library. I would to find the decision boundaries of each class and subsequently plot them. I wonder if anybody can offer any help on this topic? Below I applied the lda function on a small dataset of mine. Any help will be much appreciated. > library(MASS) >
2002 Jul 16
1
Watson test
Hi, I develop a little pice of code to perform a watson test. I try to compare the result obtain with my code and those given by the R library CircStats and it's watson(x,alpha,dist) provided function. My trouble is that I've got a set of test data (with it's watson test result) and the result given by R's watson function is not the same. Is there anybody who knows witch function