similar to: x, y for point of intersection

Displaying 20 results from an estimated 4000 matches similar to: "x, y for point of intersection"

2009 Aug 23
2
difficult "for"
Hi, My english isn't brilliant and my problem is very difficult to describe but I try ;) My first question is: May I write loop "for" like this or similar - for (i in sth : sth[length(sth)], k in sth_else : length(sth_else) ) - I'd like to have two independent conditions in the same loop "for". My secound question depend on program below. I'd like to write every
2007 Apr 18
1
Conditional power, predictive power
is there no package/function in R to calculate the conditional power or the bayesian predictive power for trials with binary endpoints? Thanks -- View this message in context: http://www.nabble.com/Conditional-power%2C-predictive-power-tf3603396.html#a10066991 Sent from the R help mailing list archive at Nabble.com.
2010 Jul 29
1
[PATCH] Reflow logic to make it easier to follow
The control flow was: if (!y) { ppix = ... } if (y) { ... } else if (x) { use ppix for something } else { use ppix for something } Merge the if(!y) block with the two else branches. This avoids a false-positive in the clang static analyzer, it can't know that !y and x are mutually exclusive. The result looks something like this: if (y) { ... } else { ppix = ... if (x) {
2011 Aug 15
2
plotting segments only and in color
Hello, I've a question concerning the display of interval data. A sample dataset where X is an interval between Xa and Xb which should be displayed: Y=c(15,14,23,18,19,9,19,13) Xa=c(17,22,21,18,19,25,8,19) Xb=c(22,22,29,34,19,26,17,22) X = (Xa+Xb)/2 It's easily possible to plot the mean of the interval like: plot(X,Y) afterwards I can create lines for the interval with:
2012 Feb 09
1
Constraint on one of parameters.
Dear all, I have a function to optimize for a set of parameters and want to set a constraint on only one parameter. Here is my function. What I want to do is estimate the parameters of a bivariate normal distribution where the correlation has to be between -1 and 1. Would you please advise how to revise it? ex=function(s,prob,theta1,theta,xa,xb,xc,xd,t,delta) { expo1=
2012 Jul 10
3
fill 0-row data.frame with 1 line of NAs
Dear all Is there a simpler method to achieve the following: When I obtain an empty data.frame after subsetting, I need for it to contain one line of NAs. Here's a dummy example: > (.xb <- iris[ iris$Species=='zz', ]) [1] Sepal.Length Sepal.Width Petal.Length Petal.Width Species <0 rows> (or 0-length row.names) > dim(.xb) [1] 0 5 > (.xa <-
2004 Mar 10
3
converting lists got by tapply to dataframes
I have two lists: xa <- list( X=c(1,2,3), Y=c(4,5,6), Z=c(7,8,9) ) xb <- with( barley, tapply( X=seq(1:nrow(barley)), INDEX=site , FUN=function(z)yield[z])) I can convert xa to a dataframe easily with: as.data.frame(xa) But if i try the same with xb I get: as.data.frame(xb) Error in as.data.frame.default(xb) : can't coerce array into a data.frame What
2011 Oct 10
4
correlation matrix
Hello Gurus I have two correlation matrices 'xa' and 'xb' set.seed(100) d=cbind(x=rnorm(20)+1, x1=rnorm(20)+1, x2=rnorm(20)+1) d1=cbind(x=rnorm(20)+2, x1=rnorm(20)+2, x2=rnorm(20)+2) xa=cor(d,use='complete') xb=cor(d1,use='complete') I want to combine these two to get a third matrix which should have half values from 'xa' and half
2012 Jun 21
4
convert 'character' vector containing mixed formats to 'Date'
Dear all I have a 'character' vector containing mixed formats (thanks Excel!) and I'd like to translate it into a default "%Y-%m-%d" Date vector. x <- c("1/3/2005", "13/04/2004", "2/5/2005", "2/5/2005", "7/5/2007", "22/04/2004", "21/04/2005", "20080430", "13/05/2003",
2004 Mar 28
2
splitting a character vector
Dear R People: Suppose I have the following; xa <- c("There are 5 dogs") I would like to have a new character vector such that xb[1] is There xb[2] is are xb[3] is 5 xb[4] is dogs Since the original vector has length 1, substring will not work. Any suggestions would be MOST welcome! thanks Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences
2013 Jul 16
2
Problem following an R bug fix to integrate()
I have been told by the CRAN administrators that the following code generated an error on 64-bit Fedora Linux (gcc, clang) and on Solaris machines (sparc, x86), but runs well on all other systems): > fn <- function(x, y) ifelse(x^2 + y^2 <= 1, 1 - x^2 - y^2, 0) > tol <- 1.5e-8 > fy <- function(x) integrate(function(y) fn(x, y), 0, 1,
2009 Nov 25
1
group generics
I have classes A and B, where B contains A. In the implementation of the group generic for B I would like to use the corresponding group generic for A. Is there a way to do that? I would also appreciate any comments if what I'm trying to do seems like the wrong approach. Here's a stripped down example: setClass("A",
2017 May 30
2
Pseudo-instruction that overwrites its input register
On Tue, 30 May 2017, Nemanja Ivanovic wrote: > This is typically accomplished with something like PPC's `RegConstraint` and > `NoEncode`. You can see examples of it that are very similar to what you're after in > PPC's load/store with update forms (i.e. load a value and update the base register > with the effective address - these are used for pre-increment loads/stores).
2013 Apr 16
1
avoid losing data.frame attributes on cbind()
Dear all, How should I add several variables to a data frame without losing the attributes of the df? Consider the following: > require(Hmisc) > Xa <- iris > label(Xa, self=T) <- "Some df label" > str(Xa) 'data.frame': 150 obs. of 5 variables: $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ... $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9
2017 May 28
2
Pseudo-instruction that overwrites its input register
On Sun, 28 May 2017, David Chisnall wrote: >> let Constraints = "@earlyclobber $reg" in >> def LDWRdPtr : Pseudo<(outs DREGS:$reg), >> (ins PTRREGS:$ptrreg), >> "ldw\t$reg, $ptrreg", >> [(set i16:$reg, (load i16:$ptrreg))]>, >>
2011 Jul 28
1
Regression with ranges and displaying them in an XY-Plot
Hello UseRs, I've got 3 variables, the dependent variable Y as well as a max and a min value of the independent variable (Xa and Xb) where in some cases Xa=Xb (so actually a single value for X). First I'd like to perform a regression, but my problem is that my X is a range (acutally a censored independent variable Xa-Xb) rather then one single value. I know already some possible
2011 Aug 10
2
function runif in for loop
Hello, I'd like to perform a regression using MCMCregress (MCMCpack). One variable therefore should be a function rather than a variable: I want to use X as an input and X should be defined as a random number between to values. Therefore I want to use the function runif like: X <-(1, Xa, Xb) but it seems that runif doesn't allow to use vectors. So I think I've to calculate the new
2006 Jan 04
2
Using 'polygon' in a 3d plot
I'm new to R, after many years of using Matlab. I've found the R function 'polygon' to be nearly equivalent to the Matlab function 'patch'. For example, the R commands: plot(c(0, 5), c(0, 4), type = 'n', asp = 1, ann = FALSE) x <- c(1, 2, 2, 1.5, 1) z <- c(1, 1, 2, 1.7, 2) polygon(x, z, col = 'green') produce a plot with a small green shape exactly
2017 Oct 08
2
Discourage the weights= option of lm with summarized data
Indeed: Using 'weights' is not meant to indicate that the same observation is repeated 'n' times. As I showed, this gives erroneous results. Hence I suggested that it is discouraged rather than encouraged in the Details section of lm in the Reference manual. Arie ---Original Message----- On Sat, 7 Oct 2017, wolfgang.viechtbauer at maastrichtuniversity.nl wrote: Using
2017 Oct 07
1
Discourage the weights= option of lm with summarized data
In the Details section of lm (linear models) in the Reference manual, it is suggested to use the weights= option for summarized data. This must be discouraged rather than encouraged. The motivation for this is as follows. With summarized data the standard errors get smaller with increasing numbers of observations. However, the standard errors in lm do not get smaller when for instance all weights