Displaying 20 results from an estimated 900 matches similar to: "combinations"
2012 Oct 19
4
Creating a new by variable in a dataframe
Hello,
I have a dataframe w/ 3 variables of interest: transaction,date(tdate) &
time(event_tim).
How could I create a 4th variable (last_trans) that would flag the last
transaction of the day for each day?
In SAS I use:
proc sort data=all6;
by tdate event_tim;
run;
/*Create last transaction flag per day*/
data all6;
set all6;
by tdate event_tim;
last_trans=last.tdate;
Thanks
2010 Jul 23
2
start and end times to yes/no in certain intervall
Hi List,
I have start and end times of events
structure(list(start = c("15:00", "15:00", "15:00", "11:00",
"14:00", "14:00", "15:00", "12:00", "12:00", "12:00", "12:00",
"12:00", "12:00", "12:00", "12:00", "12:00", "12:00",
2006 Jan 15
2
rsync of file list
Hi All,
I would to rsync data spread of many files from remote site. Each file
may exist in total different location - the path for each file may be
different.
My question is:
Can I do it one single rsync command, giving a file containing list of
paths as parameter, or do I need to run rsync for each file.
I did not find any option doing it in the man page. I tried to play with
2016 Apr 07
2
slowdown in notmuch perf suite with xapian 1.3.5
I hadn't noticed any interactive slowdown, but when I got around to
running the notmuch performance suite, there seems to be some noticable
slowdown with the glass backend (default in Xapian 1.3.5) compared to
chert (using xapian 1.2.22)
These tests are on an older i7 with 12G of RAM and an SSD. I'm
reasonable confident they are CPU bound. One curious thing is the
increase in system time
2009 Feb 22
2
Mysql error unknown column 'columns.user_id'
Had this error when trying to add comments to another user''s photo.
ActiveRecord::StatementInvalid in User photosController#show
Mysql::Error: Unknown column ''comments.user_id'' in ''on clause'': SELECT
photos.`id` AS t0_r0, photos.`user_id` AS t0_r1, photos.`title` AS
t0_r2, photos.`body` AS t0_r3, photos.`created_at` AS t0....
I did create a user_id
2016 Apr 08
2
slowdown in notmuch perf suite with xapian 1.3.5
Olly Betts <olly at survex.com> writes:
>
> So the T00-new.sh numbers make sense - there's more work to do, and
> we need to read existing positional data more to insert the new stuff,
> so the increased reads and writes make sense.
>
> But guessing at what the other two tests do, I wouldn't expect them to
> be affected by this.
The non-optimized-away cases of
2010 Aug 20
2
output values from within a function
Is it possible to get R to output the value of an expression, that is being calculated within a function? I've attached a very simple example but for more complicated ones would like to be able to debug by seeing what the value of specific expressions are each time it cycles through a loop that executes the expression. I'm relatively new to this so there may be much simpler more elegant
2010 Aug 24
3
multiple assignments ?
Simple one, have read and googled, still no luck!
I want to create several empty vectors all of the same length.
I would like multiple empty vectors (vec1, vec2, vec3) and want to create them all in one line.
I've tried
vec1,vec2,vec3 <- vector(length=5)
and
c(vec1,vec2,vec3) <- vector(length=5)
and several other attempts but nothing seems to work ... suggestions?
Thanks
Jim
2004 Jul 20
10
Installing X100P
I attempted to install an X100P card but it was not correctly recognized
by my Redhat 9 install. I had a test install running without any cards
which was working great minus the outward dialing since no cards
existed. Now that I have a card, I want to add it to the system. Do I
have to scratch the whole current install in order to get the X100P
running on my system or is there a way to get it
2010 Sep 16
5
using variable from for loop in naming new variables
Simple one here ... but can't get it to work ...
for (i in 1:4){
paste("stuff",[i]),sep="") <- 3 + i
}
ls()
rm(list=ls())
I just want it to create 4 new variables called stuff1, stuff2, stuff3, stuff4 with the corresponding assignments. I realise that there are more elegant functions but this is just a model of a bigger situation.
Thanks
Jim
2004 Sep 20
5
iax2_read: I should never be called
Skipped content of type multipart/mixed-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040920/0629df7b/signature-0001.pgp
2011 Feb 20
2
concatenate vector after strsplit()
ls is a list of character vectors created by strsplit()
I want to concatenate the 1st 4 character elements of each list item as a new vector called file. I admit to being confused about list syntax even after numerous readings.
Here's what I tried:
ls <- list(c("Focused", "10k", "A12", "t04.tif", "+", "µm"),
2011 Feb 18
6
sort a 3 dimensional array across third dimension ?
I'm attempting to sort a 3 dimensional array that looks like this
> x
, , 1
[,1] [,2]
[1,] 9 9
[2,] 7 9
, , 2
[,1] [,2]
[1,] 6 5
[2,] 4 6
, , 3
[,1] [,2]
[1,] 2 1
[2,] 3 2
Such that it ends up like this ....
> y
, , 1
[,1] [,2]
[1,] 2 1
[2,] 3 2
, , 2
[,1] [,2]
[1,] 6 5
[2,] 4 6
, , 3
[,1] [,2]
2011 Mar 30
5
save ordinary numerical calculations as pdf
I'd like to save some calculation outputs as a pdf, to incorporate with others in a document. I've tried
pdf("filename")
name_of_object_to_output
dev.off()
but it doesn't seem to work, appears that this pdf function is for graphics?
Is there a way to output numerical objects to pdf?
Thanks
J
Dr. Jim Maas
University of East Anglia
2004 Aug 08
6
Voicepulse problems?
Is any one else having problems with Voicepulse today? Suddenly, I can't
register and calls to my Voicepulse numbers get a fast busy.
Bruce Komito
High Sierra Networks, Inc.
www.servers-r-us.com
(775) 236-5815
2011 Mar 14
7
creating character vector
Is there a way to convince R to create a character vector without using the quotes?
This works
ex1 <- c("first","second")
but when I try this it doesn't
ext <- as.character(c(first,second))
it complains. I have many variables to put into character vectors so dispensing with the quotes would be useful.
Thanks
Jim
===============================
Dr. Jim Maas
2011 Feb 17
7
removing lower and upper quantiles from an arry
I'm trying to work out the simplest way to remove the upper and lower quantiles, in this case upper and lower 25% from an array. I can do it in two steps but when I try it in one, it fails. Is there something simple missing from my syntax or are there other simple elegant way to accomplish this?
Thanks
J
> i <-1:20
> i2 <- i[i<quantile(i,.75)]
> i3 <-
2010 Aug 31
4
pasting together 2 character arrays
If possible I would like to combine two different character arrays in combinations
Array1 <- c("height","weight","age","sex")
Array2 <- c("trt0","trt1","trt2")
I would like to combine these two character vectors to end up with such ...
Array3
"height.trt0.trt1"
"height.trt0.trt2"
2010 Oct 20
2
create a list fails
I can not understand why this fails
>
> faicoutput2 <- list(stuff21 = as.numeric(faicout$coefficients[2]),
+ stuff31=as.numeric(faicout$coefficients[3]),
+ stuff41=as.numeric(faicout$coefficients[4]),
+ stuff32=(stuff21-stuff31),
+ stuff42=(stuff21-stuff41),
+
2011 Feb 17
2
does range of values in array include a third value?
I'm using the range command to get the minimum and maximum values of an array as in
x <- range(array_y)
which gives me two values such as
[1] -2 9
I need to be able to test if this range of values includes a third value. For example I'd like to query
1) does the range of -2 to 9 include 3, answer TRUE
2) does the range of -2 to 9 include -6, answer FALSE?
All values could be