Displaying 20 results from an estimated 10000 matches similar to: "Advice: How to best ensure column values match in different vectors?"
2011 Nov 26
2
simplify source code
Hi
I would like to shorten
mod1 <- nls(ColName2 ~ ColName1, data = table, ...)
mod2 <- nls(ColName3 ~ ColName1, data = table, ...)
mod3 <- nls(ColName4 ~ ColName1, data = table, ...)
...
is there something like
cols = c(ColName2,ColName3,ColName4,...)
for i in ...
mod[i-1] <- nls(ColName[i] ~ ColName1, data = table, ...)
I am looking forward to help
Christof
2006 Dec 19
26
Match a Numer - then continue with dialplan
Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan?
I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature.
Doug.
2010 Sep 17
1
How to compare, match two columns from diferent dataframe and assign values from one datafram to the other
Dear R experts,
I'm new to R. It seems to be a simple question but I just can't find a way to do it. Please help me.
I have two data sets x and y as shown in the following. I want to compare the first two columns in x and y, find the matched ones and assign the relative value from column 2 of y to generate the third column of x. Any help wil be appreciated. Thanks.
> x
[,1]
2024 Jun 09
2
head.ts, tail.ts loses time
Hello, All:
The 'head' and 'tail' functions strip the time from a 'ts' object.
Example:
> head(presidents)
[1] NA 87 82 75 63 50
> window(presidents, 1945, 1946.25)
Qtr1 Qtr2 Qtr3 Qtr4
1945 NA 87 82 75
1946 63 50
Below please find code for 'head.ts' and 'tail.ts' that matches
'window'.
Comments?
2024 Jun 10
2
head.ts, tail.ts loses time
>>>>> Spencer Graves
>>>>> on Mon, 10 Jun 2024 07:50:13 -0500 writes:
> Hi, Gabor et al.: Thanks for this. I should change my
> current application to use either zoo or xts, as Gabor
> suggests.
> However, I was surprised to learn that "[.ts" does NOT
> return an object of class "ts". I see that
2024 Jun 10
1
head.ts, tail.ts loses time
zoo overcomes many of the limitations of ts:
library(zoo)
as.ts(head(as.zoo(presidents)))
## Qtr1 Qtr2 Qtr3 Qtr4
## 1945 NA 87 82 75
## 1946 63 50
xts also works here.
On Sun, Jun 9, 2024 at 12:04?PM Spencer Graves
<spencer.graves at prodsyse.com> wrote:
>
> Hello, All:
>
>
> The 'head' and 'tail' functions strip the time
2024 Jun 10
1
head.ts, tail.ts loses time
Hi, Gabor et al.:
Thanks for this. I should change my current application to use either
zoo or xts, as Gabor suggests.
However, I was surprised to learn that "[.ts" does NOT return an
object of class "ts". I see that "head.default" and "head.matrix" both
call "[", so "head" cannot return a ts object, because "["
2007 Sep 22
2
[LLVMdev] LLVM 2.1 Pre-release Version 2 Online
LLVMers,
The LLVM 2.1 pre-release version2 is now available:
http://llvm.org/prereleases/2.1/version2/
You can help test this pre-release by doing one of the following:
1) Download llvm-2.1, llvm-test-2.1, and the appropriate llvm-gcc4.0
binary. Run "make check" and the full llvm-test suite (make
TEST=nightly report).
2) Download llvm-2.1, llvm-test-2.1, and the llvm-gcc4.0 source.
2024 Jun 11
1
head.ts, tail.ts loses time
It isn't really clear that it can't work. This does work by inserting NA's.
library(zoo)
as.ts(as.zoo(lynx)[ c(1:3, 7) ] )
## Time Series:
## Start = 1821
## End = 1827
## Frequency = 1
## [1] 269 321 585 NA NA NA 3928
On Mon, Jun 10, 2024 at 10:32?AM Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>
> >>>>> Spencer Graves
2024 Jun 10
1
head.ts, tail.ts loses time
Hi, Martin et al.:
On 6/10/24 9:32 AM, Martin Maechler wrote:
>>>>>> Spencer Graves
>>>>>> on Mon, 10 Jun 2024 07:50:13 -0500 writes:
>
> > Hi, Gabor et al.: Thanks for this. I should change my
> > current application to use either zoo or xts, as Gabor
> > suggests.
>
>
> > However, I was
2012 Jan 27
1
CentOS 6.2 XEN 4.1.2 Serial console
Hey,
I''m more a reader than a poster on this list but Recently I installed
CentOS 6.2 with myoung XEN Dom0 kernel and 4.1.2 hypervisor, at first
everything went smooth, DomUs run like a charm and so on, but my serial
console is gone for good tried dmesg | grep tty which spits out:
uname -r
2.6.32-131.21.1.el6.xendom0.x86_64
dmesg | grep tty
console [tty0] enabled
Weirdest thing when
2018 Feb 03
4
Unfortunate results from fake-super
When using fake-super mode in an rsync receiver, anything that's neither a
file nor a directory (e.g. devices, symlinks, etc) is converted into a file,
and properties such as original ownership, filetype, and permissions are
stored in a specific extended attribute.
In the case of a symlink, the contents of the link are stored in a plain
file. The original mode of the symlink is normally
2010 May 23
4
creating a reverse geometric sequence
Hello,
Can anyone think of a non-iterative way to generate a decreasing geometric
sequence in R?
For example, for a hypothetical function dg, I would like:
> dg(20)
[1] 20 10 5 2 1
where I am using integer division by 2 to get each subsequent value in the
sequence.
There is of course:
dg <- function(x) {
res <- integer()
while(x >= 1) {
res <- c(res, x)
x
2009 Feb 23
1
[LLVMdev] 2.5 Pre-release2 available for testing
On Mon, Feb 23, 2009 at 12:12 AM, Aaron Gray <
aaronngray.lists at googlemail.com> wrote:
> On Sun, Feb 22, 2009 at 11:15 PM, Anton Korobeynikov <
> anton at korobeynikov.info> wrote:
>
>>
>> Actually its [configure-stage3-intl] where its hanging.
>>
>> This can easily be due to inline FP math in the stdlib headers. For
>> example - I had to
2006 Apr 13
3
[LLVMdev] Re: Creating Release 1.7 Branch at 1:00pm PDT
Here's what's left on Linux (GCC 4.1.0), after all updates that went
into the branch:
Running /proj/llvm/build/../llvm/test/Regression/CFrontend/dg.exp ...
FAIL: /proj/llvm/build/../llvm/test/Regression/CFrontend/2004-02-12-
LargeAggregateCopy.c.tr:
gccas: /proj/llvm/build/../llvm/lib/VMCore/Function.cpp:266: unsigned
int llvm::Function::getIntrinsicID() const: Assertion `0 &&
2004 Mar 04
2
Compiling under kernel 2.6.0 and after
Hi,
I'm trying to compile Samba 3.0.2a under Linux 2.6.3 (same problem on all
2.6.x kernels) and get the following error chucked out. Only occurs
with --with-smbmount as you might expect from the file it fails on.
Anyone else had this problem and fixed it?
Regards
Dan
In file included from /usr/include/linux/fs.h:20,
from /usr/include/linux/smb_fs.h:15,
2008 Feb 06
3
counting row repetitions without loop
Hi,
I have a data frame consisting of coordinates on a 10*10 grid, i.e.
> example
x y
1 4 5
2 6 7
3 6 6
4 7 5
5 5 7
6 6 7
7 4 5
8 6 7
9 7 6
10 5 6
What I would like to do is return an 10*10 matrix consisting of counts
at each position, so in the above example I would have a matrix where,
for example, cell [4,5] contains 2 and [6,7] contains 3. At the
2012 Jun 22
3
removing NA from a data frame
Removing rows with NAs, using na.omit(), doesn't seem to be working for me.
Dataset:
> str ( ex10s )
'data.frame': 2189576 obs. of 5 variables:
$ LOPNR : int 58 58 58 58 64 64 64 64 64 64 ...
$ DIAGNOS: Factor w/ 173 levels "F20","F200","F2000",..: 128 128 128 128 105 105 105 160 105 105 ...
$ X_DATE : int 20060821 20061207 20080102 20090904
2009 Sep 18
5
[LLVMdev] OT: intel darwin losing primary target status
I thought of another work around. The FSF gcc driver can implicitly
add -no_compact_unwind to the link line. This tells the linker to not
produce compact unwind information from the dwarf unwind info in .o
files. Then at runtime the darwin unwinder will fallback and use the
slow dwarf unwind info.
-Nick
On Sep 18, 2009, at 2:27 PM, Nick Kledzik wrote:
> I dug into this. Based on
2007 Apr 25
2
assigning two conditions to grep()
Hi,
i have a problem in assigning 2 conditions to grep() ,
my data look like this:
DA 24 N7 Rad= 3.4 20 Sac= 0.93 Acc= 4.76
DA 24 N7 Rad= 3.4 14 Sac= 0.65 Acc= 3.33
DA 24 N7 Rad= 3.4 3 Sac= 0.14 Acc= 0.71
DA 24 N7 Rad= 3.4 11 Sac= 0.51 Acc= 2.62
DG 23 N7 Rad= 3.4 8 Sac= 0.37 Acc= 1.91
DG 23 N7 Rad= 3.4 5 Sac= 0.23 Acc= 1.19
DG 23 N7 Rad= 3.4 0 Sac= 0.00 Acc= 0.00
DG 23 N7 Rad= 3.4 3 Sac=