Displaying 20 results from an estimated 10000 matches similar to: "How to manipulate an abitrary dimensioned array."
2003 Jul 16
2
Is there a bug in qr(..,LAPACK=T)
The following snippet suggests that there is either a bug in qr(,LAPACK=T), or some bug in my understanding. Note that the detected rank is correct (= 2) using the default LINPACK qr, but incorrect (=3) using LAPACK. This is running on Linux Redhat 9.0, using the lapack library that comes with the Redhat distribution. I'm running R 1.7.1 compiled from the source. If the bug is in my
2011 Jul 27
1
Converting F-value from ANOVA to cohen's d in meta-analysis (metafor-package)
Dear R-experts!
Running a meta-analysis (using the magnificent metafor-package), I use
cohen's d as a main outcome measure in a random-effects model.
For most of the samples cohen's d is derived form a comparison of two groups
(A & B). However some studies report results from an ANOVA (one-factor with
three levels: C,D,E) whereas two groups (C,D) correspond to one group in the
other
2010 Dec 29
2
How to create an array of lists of multiple components?
Hi,
how can I create an array of lists of three components?
This approach does not work:
n1 <- 2
n2 <- 4
n3 <- 5
res <- array(rep(vector("list",3), n1*n2*n3), dim = c(n1,n2,n3))
res[1,1,1] # is not a list with three components...
The goal is that res[1,1,1] is a list with three components. Also, appending the
components didn't work. For example, I tried:
component
2016 Jul 21
3
Fwd: Problem of array index manipulation collection of LLVM IR
Hi there,
I am a newbie of llvm and here is my question situation. Assume that there
is a function F which contains a loop named L, a array b[100]. I want to
collect the statistical information of array index operation op(i) (take
add and mul simply) of i in the loop L. Pseudocode lists below.
void F(arg1, arg2){
int b[100];
for(int i=0; i<n; i++){
op1(i);
op2(i);
2009 Jul 23
1
dimension trouble for a matrix
Dear R People:
I'm having trouble with something that should be very simple.
I'm setting up a matrix outside of a loop and writing items into it
during the loop.
Here is the output:
> glob3b("sites.info")
dim 27 3
[1] "/raid1/osg-app"
Error in xy[i, ] : incorrect number of dimensions
Here is the function:
> glob3b
function(xx) {
x.df <-
2011 May 11
3
Constructing an array of stuff (to send multiple apple push notifications)
I''m using this gem https://github.com/justintv/APNS to send push
notifications to an iPhone app and amazingly it works for single
notifications, such that I can do...
APNS.send_notification(Device.first.device_token,''test message'')
Works great...
Now it should be a simple task (as per the docs to send multiple
notifications)
Gem says like this...
device_token =
2001 Jan 17
4
Can one set --no-save in .Rprofile
(On Unix/Linux)
Is it possible to set the --no-save command line option as an option
in the .Rprofile file. I have looked in the sources and do not see
any obvious (user initiated) ways of changing the command line defaults,
but I am hoping I have missed something.
I *know* I can write my own shell script wrapper that calls R with
whatever arguments I want (and I do that). However there
2019 Jul 25
0
[RFC] A new multidimensional array indexing intrinsic
It's also very common in Fortran.
-David
Michael Ferguson via llvm-dev <llvm-dev at lists.llvm.org> writes:
>> It seems that the main advantage of your proposal is that it would
>> allow for non-constant strides (i.e. variable length arrays) in
>> dimensions other than the first one. Do these appear frequently
>> enough in the programs
2003 Jun 06
2
little manipulation on data frame
Dear all,
I have data like 3 coulmns and many rows. Each entry
is less than 10.
Example
x y z
1 5 3 2
2 3 7 8
3 8 9 5
4 5 4 6
--------------------------
---------------------------
I have to sum entries of each coulmn (seperately) till
it be 10. This i have to start for each row. And I
want to assign no. of rows needed including that row
too(it to be 10 or 10+, the moment it exceeds 10, i
2019 Jul 22
2
[RFC] A new multidimensional array indexing intrinsic
> It seems that the main advantage of your proposal is that it would allow for non-constant strides (i.e. variable length arrays) in dimensions other than the first one. Do these appear frequently enough in the programs that you're interested in to be worth optimizing for?
Yes - at least in Chapel (which is one of the motivating languages)
these are very common.
In other words, typical
2019 Jul 22
2
[RFC] A new multidimensional array indexing intrinsic
We could also simply extend the existing inrange mechanism to
non-constantexpr GEPs. It would remove an inconsistency in the
semantics, be relatively straight forward, and solve the motivating
example.
(I didn't read the proposal in full, so there may be other examples it
doesn't solve.)
Philip
On 7/22/19 10:01 AM, Peter Collingbourne via llvm-dev wrote:
> The restrictions of
2017 Jan 24
3
Convertir programa Matlab a R sacado de Threshold Models of Collective Behavior de Michèle Lai & Yann Poltera
Estimados Usuarios-R:
Estoy convirtiendo un programa en Matlab a R.
El original lo saqu de:
Lai, M., & Poltera, Y. (2009). Lecture with computer exercises: Modelling and simulating social systems with matlab. Tech. rep., Swiss Federal Institute of Technology (December 2009). 27.
Ahora estoy convirtiendo la siguiente funcin:
function sizes = gridsizes(N,varargin)
% gridsizes(N) calculates
2009 Apr 15
6
Intersection of two sets of intervals
Hi,
Algorithm question: I have two sets of "intervals", where an interval is
an ordered pair [a,b] of two numbers. Is there an efficient way in R to
generate the intersection of two lists of same?
For concreteness: I'm representing a set of intervals with a data.frame:
> list1 = as.data.frame(list(open=c(1,5), close=c(2,10)))
> list1
open close
1 1 2
2 5
2012 Dec 04
1
Solve system of equations (nleqslv) only returns origin
I'm solving 4 complex equations simultaneously. Code is below. The code
returns only zero's for the solution though there should also be a non-zero
result. I'm pretty confident that the equations are correct because they
are straight from a published paper and I checked them pretty thoroughly.
The parameter values I used are from the published paper as well. Any
suggestions for how
2012 Dec 17
1
seeking a help on if function
Hello r helpers! Below is the whole coding for my programme. Before proceed more further, let me explain for you. First of all, I need to compute trimmed mean. Till that step is ok. Then I need to compute ssdw which is sum of square deviation. If I do equal trimming at both tail of distribution that I chose, I will use the first ssd formulae which is "a". But if I am doing unequal
2013 Mar 29
3
if clause in data frame
Hi,
final<-data.frame()
?? for (m1 in 4:10) {
?????? for (n1 in 4:10){?
?????????? for (x1 in 0: m1) {
????????????? for (y1 in 0: n1) {
final<- rbind(final,c(m1,n1,x1,y1))
res}}}}
?final1<-within(final,{flag<-ifelse(x1/m1>y1/n1, 1,0)})
?head(final1)
#? m1 n1 x1 y1 flag
#1? 4? 4? 0? 0??? 0
#2? 4? 4? 0? 1??? 0
#3? 4? 4? 0? 2??? 0
#4? 4? 4? 0? 3??? 0
#5? 4? 4? 0? 4??? 0
#6? 4? 4?
2010 Jul 24
1
Doubt about a population competition function
Hi,
I'm doing a function that describe two populations in competition.
that's the function that i wrote:
exclusao<-function(n10, n20, k1, k2, alfa, beta, t){
n1<-k1-(alfa*n20)
n2<-k2-(beta*n10)
if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c
(1:t)), ylim=range(n10, n20), xlab='tempo',
ylab='tamanho populacional')
points(t, n20, type='b',
2013 Feb 01
2
How does this function print, why is n1 which equals 1 printed as 2?
Windows 7, R 2.12.1
Colleagues,
I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will note the value (preceded by stars) is printed as 1.
The function (1) prints a lot of output without any
2003 Nov 24
1
[PATCH] library functions
Hi,
Here are some new library functions for klibc. Some of them are
required for udev, which currently has a klibc_fixups.c file that
implements these functions.
mh
--
Martin Hicks Wild Open Source Inc.
mort@wildopensource.com 613-266-2296
# This is a BitKeeper generated patch for the following project:
# Project Name: The kernel C library
# This patch format is intended
2009 Nov 02
1
need help in using Hessian matrix
Hi
I need to find the Hessian matrix for a complicated function from a certain
kind of data but i keep getting this error
Error in f1 - f2 : non-numeric argument to binary operator
the data is given by
U<-runif(n)
Us<-sort(U)
tau1<- 2
F1tau<- pgamma((tau1/theta1),shape,1)
N1<-sum(Us<F1tau)
X1<- Us[1:N1]