Displaying 20 results from an estimated 4000 matches similar to: "coalesce columns within a data frame"
1997 Sep 05
2
R-beta: help with R simulation
[[this bounced first, because it has 'help' in the Subject line ...
-- Martin Maechler
]]
I am a complete novice R programmer. (Though I know C quite well)
I am trying to write some R code to do the following simulation.
There is a 2-frame "movie" of noise and signal dots. the noise
dots have random positions in each frame. The signal dots are
placed randomly in frame 1,
2003 Aug 04
1
Novice question
Hello.
I am new R user, so this question is probably quite stupid, but for
the life of me I cannot figure out how to get predications using
multivariate linear regression analysis. Single variable predictions
work fine. I am trying the following:
-- Known y's for known x's1 and x's2
ys <- c(133890, 135000, 135790, 137300, 138130, 139100, 139900,
141120, 141890, 143230, 144000,
1998 Jul 09
1
numeric(0) -> NA
I noticed this in current intermediate patch version:
> runif(0,0,4095)
numeric(0)
> round(runif(0,0,4095))
[1] NA
I don't like it, but maybe it is the way it is supposed to be. I would
prefer for it to stay numeric(0).
I notice also
> ceiling(runif(0,0,4095))
numeric(0)
> floor(runif(0,0,4095))
numeric(0)
which leads me to thing round() is not working right.
I have some code
2019 Jul 22
3
[RFC] A new multidimensional array indexing intrinsic
Am Mo., 22. Juli 2019 um 10:50 Uhr schrieb Doerfert, Johannes
<jdoerfert at anl.gov>:
> Why introduce a new intrinsic (family)? It seems that would require us
> to support GEPs and GEP + "multi-dim" semantics in various places. What is
> the benefit over a GEP extension?
Adding an intrinsic is easier than adding or extending an existing
instruction, as suggested by
2006 Jul 22
1
Why the contrain does not work for selecting a particular range of data?
Dear:
Continuing the issue of 'ifelse'! I selecting the data whose 'x2'=1 for maximizing likelihood. I used two way to do this but the results are different.
1.Way one I use the data for x2=1 and run the program. It works for me. Tthe program is described as below:
function (parameters,y1,x11)
{
p<-parameters[1]
alpha1<-parameters[2]
beta1<-parameters[3]
2007 Jan 24
2
channel name
Hello everybody,
I was wondering if anybody knows how to make channel IDs different if all
call are coming from the same host:
core show channels
Channel Location State Application(Data)
SIP/sip-ny1.stanapho 16462257222@in-sip:4 Up Playback()
SIP/sip-ny1.stanapho 16462257222@in-sip:4 Up Playback()
Thanks in advance.
Serge
-------------- next part
1997 May 11
2
R-alpha: Logarithmic scales
Here are another three problems with logarithmic scales:
1) segments() does not work with logarithmic scales. I suggest to change
lines 962-973 in "plot.c":
for (i = 0; i < n; i++) {
if (FINITE(xt(x0[i%nx0])) && FINITE(yt(y0[i%ny0]))
&& FINITE(xt(x1[i%nx1])) && FINITE(yt(y1[i%ny1]))) {
GP->col = INTEGER(col)[i % ncol];
2005 May 01
1
opimization problem
hi,
i want to execute the following opimization problem:
max r*w
s.t.: w*z=1 # sum of w is 1
r, w are [nx1] vectors, z is a [nx1] vector consisting of 1
so far so good, works fine with lp
the problem arises with the additional restriction
w' * V * w
where V is a [nxn] matrix
how can i include this restriction since w arises twice?
thanks,
gg
--
2012 Mar 08
3
Calculating length of consecutive sequences within a vector
Hi all,
I have a nx1 logical array of zeros and ones and I want to calculate the individual lengths of all 1-consecutive sequences contained in it. Is there an easy quick way to do this in R? So, if I have a vector such as
111001101000011111110
I would like to get (1) 3, (2) 2, (3) 1, (4) 7
Any help would be appreciated! thanks!
Jorge
[[alternative HTML version deleted]]
2005 Mar 18
4
passing arguments to FUN in lapply
Suppose I have a nx2 matrix of data, X, the following code generate
density estimation for each column and plot them
denlist <- apply(X, 2, density)
par(mfrow=c(1,2))
lapply(denlist, plot)
Does anyone know how to change the main title of each density plot
to "var 1", "var 2" by passing optional argument "main"? I've tried
lapply(denlist, plot,
2024 Aug 11
1
Printing
Hi
In the following codes, I had to choose between printing (= TRUE) or
deliver something for grab (ei, vi). Is there a way to get both--that
is, to print and also have ei and vi for grab? Thanks.
Steven
...
out<-round(as.data.frame(cbind(ap,se,t,p)),digits)
out<-cbind(out,sig)
out<-out[!grepl(colnames(zx)[1],rownames(out)),]
if(printing){
cat("\nAPPs of bivariate ordered
2009 Jul 07
3
Error due to non-conformable arrays
Hello,
Consider this function for generalized ridge regression:
gre <- function (X,y,D){
n <- dim(X)[1]
p <- dim(X)[2]
intercept <- rep(1, n)
X <- cbind(intercept, X)
X2D <- crossprod(X,X)+ D
Xy <- crossprod(X,y)
bth <- qr.solve(X2D, Xy)
}
# suppose X is an (nxp) design matrix and y is an (nx1) response vector
p <- dim(x)[2]
D<- diag(rep(1.5,p))
bt
2010 Jul 06
2
How do I plat timestamed (in seconds) data in R?
Hi all,
I have an Nx2 array, where the first column contains the timestamps and the
second column contains the corresponding data.
second | ts
--------| --
14:25:00| 18
14:25:02| 14
14:25:04| 11
14:25:06| 4
14:25:08| 24
14:25:10| 13
14:25:12| 12
14:25:14| 6
14:25:16| 21
14:25:18| 37
14:25:20| 21
14:25:22| 9
Since I don't know how to do this in R yet, please allow me to show data in
Matlab:
2005 May 20
4
issues with identical()
Hi all, hope you having a nice day,
I ahve this weird results with identical (probably I am not understanding
correctly what it does ...)
I have these two data frames and I issue :
> identical(temp, temp1)
[1] FALSE
However, these data frames are Nx2 and when I issue:
> identical(temp[,2], temp1[,2])
[1] TRUE
> identical(temp[,1], temp1[,1])
[1] TRUE
and the results from str
>
2007 Sep 03
2
The quadprog package
Hi everybody,
I'm using Windows XP Prof, R 2.5.1 and a Pentium 4 Processor.
Now, I want to solve a quadratic optimization program (Portfolio Selection) with the quadprog package
I want to minimize (\omega'%*%\Sigma%*%\omega)
Subject to
(1) \iota' %*% \omega = 1 (full investment)
(2) R'%*%\omega = \mu (predefined expectation value)
(3) \omega \ge 0 (no short sales).
Where
2024 Aug 11
1
Printing
?s 09:51 de 11/08/2024, Steven Yen escreveu:
> Hi
>
> In the following codes, I had to choose between printing (= TRUE) or
> deliver something for grab (ei, vi). Is there a way to get both--that
> is, to print and also have ei and vi for grab? Thanks.
>
> Steven
>
> ...
>
> out<-round(as.data.frame(cbind(ap,se,t,p)),digits)
> out<-cbind(out,sig)
>
2004 Mar 29
9
Aggregating frequency of irregular time series
> S-Plus has the function AggregateSeries() whose name is self
> explanatory. For instance one can derive monthly series from daily
> ones by specifying end-of-period, averages, sums, etc. I looked for
> a similar function in the packages "its" and "tseries", but found
> nothing. I also help.searched() for aggregate to no avail. Would
> anybody be so kind
2007 Feb 06
3
Help - Poor Voice Quality
I'm struggling to get my VOIP installation to be acceptable. I'm
looking for advice on what else I can look for.
My system:
o Teliax VOIP service, voip-ny1 proxy
o RCN Cable Internet Service (3Mbps download, 500kbps upload, 6ms
average jitter)
o 3.2 GHZ P4 Server (runs asterisk, firewall, other stuff)
o server lightly loaded
o Linux kernel 2.6.19.2
o Shorewall Firewall software with
2019 Jul 21
6
[RFC] A new multidimensional array indexing intrinsic
Hello,
We would like to begin discussions around a new set of intrinsics, to
better express
multi-dimensional array indexing within LLVM. The motivations and a
possible design
are sketched out below.
Rendered RFC link here
<https://github.com/bollu/llvm-multidim-array-indexing-proposal/blob/master/RFC.md>
Raw markdown:
# Introducing a new multidimensional array indexing intrinsic
## The
2024 Aug 11
3
Printing
Thanks. Will try it.
Have not tried it but I think the following may work:
out$results<-NULL
out$results$ei<-ap
out$results$vi<-vap
All I need is printing by returning out (unless I turn it off). And,
retrieve ap and vap as needed as shown above. Guess I need to read more
about invisible.
On 8/11/2024 10:09 PM, Rui Barradas wrote:
> ?s 09:51 de 11/08/2024, Steven Yen escreveu: