Displaying 20 results from an estimated 5000 matches similar to: "Repeated Indexing / Sequence Operation"
2009 Jun 10
2
How to get the unique pairs of a set of pairs dataframe ?
Hi friends,
Please can anyone help me with an easier solution of doing the below
mentioned work.
Suppose i have a dataset like this:---
i1 i2 i3 i4 i5
1 7 13 1 2
2 8 14 2 2
3 9 15 3 3
4 10 16 4 4
5 11 17 5 5
6 12 18 6 7
*i1,i2,i3,i4,i5 are my items.I am able to find all possible pairs i.e
Say this dataframe is "item_pairs"
**i1,i2
**i1,i3
**i1,i4
i1,i5
**i2,i1
2003 Sep 25
1
apply on a 4D array
I am trying to multiply a 3D array of 4x4x4 by the 4 3D arrays of a 4D array
with dimensions 4x4x4x4 (the last dimension being the one that I want to
split by).
(4x4x4 array)
> hiaAry
, , a1
i1 i2 i3 i4
h1 9.5936098 6.001040 0.08772 0.3138600
h2 1.2003500 1.454570 2.79248 0.0000000
h3 0.1346500 0.201220 0.39256 0.5464000
h4 0.0109000 0.012270 0.16417 0.2766900
,
2012 Apr 27
2
question of iSCSI pool on the same iSCSI target
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120427/287fd756/attachment.htm>
2010 Oct 19
2
[LLVMdev] Structure memory layout
Hi Renato,
Firstly, I have been removing target specific information from struct type on bitcode.
Target specific information are type size, type alignment, merged bitfields and so on.
For example
1 struct test {
2 char a:3;
3 char b:4;
4 char c:3;
5 char d:2;
6 };
7
8 struct test vm = {1, 2, 3, 1};
9
10 int main(void)
11 {
12 int a;
13 vm.d = 1;
14 }
Above
2010 Jan 14
2
Fixed size permutations
I'm using functions to return a matrix of all permutations of a
specified size from a larger list for predictor selection.
For each predictor size I use a seperate function like this:
bag2 <- function(n) {
rl <- c()
for (i1 in seq(n)) {
for (i2 in seq(n)) {
if (length(unique(c(i1,i2)))==1) {next}
rl <- cbind(rl,matrix(c(i1,i2)))
}
}
2010 Oct 19
0
[LLVMdev] Structure memory layout
Hi Jin Gu Kang
> 5 %0 = type { i3, i4, i3, i2 }
each of the above struct fields occupies 1 byte. If you were hoping that an
i3 field would occupy only 3 bits then I am sorry, it doesn't work that way.
Ciao,
Duncan.
2010 Dec 29
2
subset question
Hi,
I'm having a problem with a step that should be pretty simple.
I have a dataframe, d, with column names : gene s1 s2 s3. The column "gene"
stores an Id; the rest of the columns store intensity data.
I would like to extract the rows for gene Ids i1, i2, i3 ( I know a priori
that those rows exist).
So I do this:
subset(d, gene %in% c(i1, i2, i3)).
This does not give me the
2010 Nov 07
3
Integrate and mapply
Hi,
I need some help on integrating a function that is a vector.
I have a function - vector which each element is different. And,
naturally, function integrate() does not work
I checked the article of U. Ligges and J. Fox (2008) about code
optimization "How Can I Avoid This Loop or Make It Faster?" on
http://promberger.info/files/rnews-vectorvsloops2008.pdf.
Their advice did not help
2009 Aug 31
2
interactions and stall or memory shortage
Hello,
After putting together interaction code that worked for a single pair of
interactions, when I try to evaluate two pairs of interactions(
flowers*gopher, flowers*rockiness) my computer runs out of memory, and the
larger desktop I use just doesn't go anywhere after about 20 minutes.
Is it really that big a calculation?
to start:
mle2(minuslogl = Lily_sum$seedlings ~ dnbinom(mu = a,
2004 Nov 01
3
Reading word by word in a dataset
Hello All,
I'd like to read first words in lines into a new file.
If I have a data file the following, how can I get the
first words: apple, banana, strawberry?
i1-apple 10$ New_York
i2-banana 5$ London
i3-strawberry 7$ Japan
Is there any similar question already posted to the
list? I am a bit new to R, having a few months of
experience now.
Cheers,
John
2008 May 08
1
Reading multiple tables from file
Dear R-users,
I have output files having a variable number of tables
in the following format:
-------------
1
Pietje
I1 I2 Value
1 1 0.11
1 2 0.12
2 1 0.21
2
Jantje
I1 I2 I3 Value
1 1 1 0.111
3 3 3 0.333
...
-------------
Would there be an easy way
of turning this into (a list of) data.frames
with names Pietje, Jantje
and variables I1,I2,...Value?
(I1,I2 are string or categorical,
2013 Apr 17
1
Merging big data.frame
Hi all,
I am trying to merge 2 big data.frame. The problem is merge is memory
intensive so R is going out of memory error: cannot allocate vector of size
360.1 Mb. To overcome this, I am exploring option of using data.table
package. But its not helping in term of memory as merge in data.table is
fast but not memory efficient. Similar error is coming.
My inputs are
inp1
V1 V2
1 a i1
2 a i2
3 a
2010 Nov 17
3
Parameterising apply To Compute Rolling Average of Columns in a matrix
I sent a post to find a clever way to compute a Rolling Average of columns
in a matrix and I was given the solution below which I am very pleased
with.
RollingAverage <- function(x, RollingObs) {
cx <- cumsum(x);
N <- length(x);
Temp <- (cx[RollingObs:N] - c(0, cx[1:(N-RollingObs)]))/RollingObs
Output <- array(NA, N)
Output[RollingObs:N] <- Temp;
Output
}
The only
2010 Dec 10
2
Need help on nnet
Hi,
Am working on neural network.
Below is the coding and the output
> library (nnet)
> uplift.nn<-nnet (PVU~ConsumerValue+Duration+PromoVolShare,y,size=3)
# weights: 16
initial value 4068.052704
final value 3434.194253
converged
> summary (uplift.nn)
a 3-3-1 network with 16 weights
options were -
b->h1 i1->h1 i2->h1 i3->h1
16.64 6.62 149.93
2010 Jan 21
2
Create a multi dimensional array from a data frame
Hello all,
I have data from a csv that i need to coerce into a multi dimensional
array. As you can see from my sample code i have yet to master building
efficient code. I can sort of do what i want but its very cumbersome code
and i know there is a better way to do it, i am just not expereinced enought
yet. So for the following:
#Create Data
h1i1a1<-sample(1:20, 5, replace=TRUE)
2009 Aug 17
1
R : how does %in% operator work?
*Problem-1*
CASE-I---------(works fine)
> var1<-"tom"
> var1
[1"tom"
> var1<-as.character(var1)
> var1
[1] "tom"
> var2<-c("tom","harry","kate")
> logc<-(var1 %in% var2)
> logc
[1] TRUE
> typeof(var1)
[1] "character"
> typeof(var2)
[1] "character"
2006 Jan 27
4
regular expressions, sub
Hi,
I am trying to use sub, regexpr on expressions like
log(D) ~ log(N)+I(log(N)^2)+log(t)
being a model specification.
The aim is to produce:
"ln D ~ ln N + ln^2 N + ln t"
The variable names N, t may change, the number of terms too.
I succeded only partially, help on regular expressions is hard to
understand for me, examples on my case are rare. The help page on R-help
2020 Mar 30
2
Scalar Evolution Expressions Involving Sibling Loops
> I'm not following your example. If you have two sibling loops with the
same parent, one will frequently, but not always dominate the other. Can
you give a specific example of when forming a recurrence between two
siblings (without one dominating the other), is useful?
The situation can happen with guarded loops or with a user guard like
below:
if (c) {
for (i = 0; i < n; i++)
2013 Aug 16
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
On 08/16/2013 02:42 AM, Star Tan wrote:
> At 2013-08-16 12:44:02,"Tobias Grosser" <tobias at grosser.es> wrote:
>> Hi,
>>
>> I tried to reproduce your findings, but could not do so.
>
>
> Sorry, I did not put all code in my previous email because the code seems a little too long and complicated.
> You can refer to the detailed C code and LLVM IR
2009 Jul 20
1
Regression function lm() not giving proper results
*
*
Hi ,
Can anyone help me please with this problem?*
*
*CASE-I*
all_raw_data_NAomitted is my data frame.It has columns with names i1 ,i2,
i3,i4…, till i15.It has 291 rows actually ,couldn’t show here.
The data frame looks like this:--
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15
2 2 2 2 2 2 2 2 2 2 2 1 2 2 3 2
3 2 2 2 2 3 2 2 3 3