Displaying 20 results from an estimated 6000 matches similar to: "How to get intersection of multiple vectors?"
2013 Mar 18
4
plotting CIE chromaticity diagram?
Has anyone plotted or is it possible to plot
CIE *xy* chromaticity diagram
http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg
I need this plot in color.
ishida
[[alternative HTML version deleted]]
2013 Jun 12
2
grDevices::convertColor XYZ space is it really xyY?
grDevices::convertColor has arguments 'from' and 'to' which can take on value 'XYZ'. Can someone confirm that 'XYZ' is the same as the CIE chromaticity coordinates that are also sometimes refered to as 'xyY' in the literature? Or are these the CIE tristimulus values? It looks to me like the first case is true, but I would appreciate hearing from one of
2009 Dec 08
4
lower.tail option in pnorm
Hi,
I would have thought that these two constructions would
produce the same result but they do not.
Resp <- rbinom(10, 1, 0.5)
Stim <- rep(0:1, 5)
mm <- model.matrix(~ Stim)
Xb <- mm %*% c(0, 1)
ifelse(Resp, log(pnorm(Xb)), log(1 - pnorm(Xb)))
pnorm(as.vector(Xb), lower.tail = Resp, log.p = TRUE)
> ifelse(Resp, log(pnorm(Xb)), log(1 - pnorm(Xb)))
[1] -0.6931472 -1.8410216
2013 Oct 21
3
speeding up "sum of squared differences" calculation
All,
I am using a sum of squared differences in the objective function of an optimization problem I am doing and I have managed to speed it up using the outer function versus the nested for loops, but my suspicion is that the calculation could be done even quicker. Please see the code below for a simple example. If anyone can point out a faster way I would appreciate it greatly.
Thanks,
Roger
2011 Jan 31
1
Problem with intersection between two different tables
Hi,
I'm a beginner with R.
I have two different tables with
the variable name dmr1 and tp2 a given following. v1 is the common column field of
the both tables. In the first table column v3 is always v2+1 while in
the second table v2 and v3 hold the range. I want to know which rows
of tb1 intersect with the range between v2 and v3 of tb3. I need some one's kind help to solve this
2012 Aug 14
3
self-starter functions for y = a + b * c^x
Hi
there are some predefined self-start functions, like SSmicmen, SSbiexp,
SSasymp, SSasympOff, SSasympOrig, SSgompertz, SSflp, SSlogis, SSweibull,
Quadratic, Qubic, SSexp (nlrwr)
Btw, do you know graphic examples for this functions?
The SSexpDecay (exponential decay) for y = (y0 - plateau)*exp(-k*x) +
plateau from
2010 Feb 11
1
Sweave, lty = 3 line incorect in pdf output
I'm having a problem with dotted lines (lty = 3) in the pdf output
in documents generated with Sweave. In the displayed pdf, the
dotted line does not show up and in the printed output, it is
there but does not seem to respect the lwd argument, for example, it
is very faint despite using lwd = 3. The dotted line is correct
in a quartz window and if I save the Quartz window to a pdf
and
2008 Oct 16
1
packages in Depends field and NAMESPACES
Must packages in the Depends field of the DESCRIPTION file have
NAMESPACES? I haven't seen this explicitly indicated anywhere.
I am writing a small package and find that when I add the abind
package to the list of the Depends field, I get an error in
R CMD check of the build.
* checking package name space information ... OK
* checking package dependencies ... ERROR
Packages required but not
2011 Feb 18
1
reading a matlab file
Dear R-people,
I am trying to read a matlab file, unfortunately without success. I enclosed the zipped file.
Do you have an idea how to read this file by ReadMat package into the R system?
Thanks for your time!
Wim Krijnen
2010 Mar 08
1
MaxDiff Scaling
Dear R List,
I have found that R handles a remarkable number of analytic tasks that are
overlooked by major commercial packages. However, I have not found an R
package that handles MaxDiff Scaling - does one exist?
Thanks in Advance,
Stephen Brand
2009 Sep 14
3
How to convert numbers to words?
I am trying to convert numbers to English words, e.g. 123 -> One
hundred twenty three. After some searching, I have been unable to
find any info on this. I could certainly write code to do it, but my
question is this: Does anyone know of a function that does this?
Thanks,
Derek McCrae Norton
2009 Nov 30
2
How do I run to or more R consoles on Mac OS X?
This is really annoying me... when I click R application icon it brings
already opened session in the focus and it DOESN'T open new session....
any ideas?
--
View this message in context: http://n4.nabble.com/How-do-I-run-to-or-more-R-consoles-on-Mac-OS-X-tp930979p930979.html
Sent from the R help mailing list archive at Nabble.com.
2010 Feb 14
1
NextMethod() example from S Programming by Venables and Ripley (page 78)
S Programming by Venables and Ripley (page 78) has the example listed
at the end of this email. However, I get the following error when I
try the example. I don't understand the descriptions of NextMethod on
its help page. Could somebody let me know how to fix the error of this
example?
> test(x)
c1
c2
Error in NextMethod() : no method to invoke
Calls: test -> test.c1 -> NextMethod
2010 Apr 01
1
Stack with factors
Hi R users:
I found that I cannot stack() a data.frame with factors.
db1<-data.frame(replicate(6,factor(sample(c("A","B"),6,replace=TRUE))))
str(db1)
db2<-stack(db1)
db2
"db2" does not have any row.
How can I stack them by the variables X1,X2,...,X6?
Thank you for your help.
Kenneth
2010 Sep 30
1
Several Lattice plots in one Plot
Hi all,
I've been trying for hours, but I do not find a Solution. I want to plot 12 variables over time in separate diagrams in one plot/window using lattice. Two columns, six rows. I used print with the split command, but the graphics are getting really small. Can someone please help me.
Following data example:
dta = data.frame(
day=c(1,2,3,4,5,6,7),
2011 Jan 06
1
Deselect one of the array's matrix
Hello everyone and season's greetings.
I have an array that looks like that R<-c(1,2,3,4,5,6).
Is it possible to select all the elements but except one? For example to not select the third element and get back
(1,2,4,5,6)?
How can I do that?
I would like to thank you in advance for your help
Best Regards
Alex
[[alternative HTML version deleted]]
2011 Oct 04
1
Plotting a polygon with xyplot
Dear R helpers
I would like to plot a string of points as a polygon in xyplot. I'm a bit
lost as to how to get the points plotting in the correct order. I would
also like some hints on how to render or fill the polygon.
Scrpt below and data file attached
Thanks
Markm
library("lattice")
# set size of the window
windows(height=7, width=10,rescale=c("fixed"))
2012 Mar 01
2
User defined link function with extra parameters
Hello R users,
I would like to fit a generalized linear model for the binomial family
with some non standard link functions. For instance, this is the
Aranda-Ordaz link:
? = ln( ( (1 - ?)^-? - 1 )/?)
I know how to define a new link function to use with glm(), but I my
problem is that I have an extra parameter to estimate and I have no clue
how to incorporate that. Is there any way to tell
2008 Sep 09
1
puzzle about contrasts
Hi,
I'm trying to redefine the contrasts for a linear model.
With a 2 level factor, x, with levels A and B, a two level
factor outputs A and B - A from an lm fit, say
lm(y ~ x). I would like to set the contrasts so that
the coefficients output are -0.5 (A + B) and B - A,
but I can't get the sign correct for the first coefficient
(Intercept).
Here is a toy example,
set.seed(12161952)
y
2023 Jan 28
1
lines through points in lattice legend
On Sat, Jan 28, 2023 at 2:49 PM Kenneth Knoblauch
<ken.knoblauch at inserm.fr> wrote:
>
> Hi,
>
> I'm struggling to find if there is a simple way to make the lines and points overlap in a legend for a lattice plot using auto.key. Here is a toy example of what doesn't work (for me) as the lines and points are adjacent rather than overlapping:
>
> library(lattice)