Displaying 20 results from an estimated 1000 matches similar to: "Advice on long for loop"
2011 Mar 10
1
vegan CCA I am Completely new to ordination analyses
Dear list,
I am trying to predict species volume from bioclimatic data, I have various
sites and I have a data frame with species volume and
the corresponding bioclimatic data for each site.
I read on a discussion forum that you can use ordination to predict species
abundance (in my case volume) from 'new' climate data for sites where you do
not know the abundance.
Unfortunately I
2010 Apr 19
2
selecting rows based on number that occurs after letter
Hello,
I am trying to cycle through a csv and make some summary statistics.
I need to select rows based on the number in the row name that comes
after the letter 'y'. For example, ? BA1y1 would equal 1, ?C3A2r3y1
would equal 1 and ?MA3r3y1r3 would equal 1.
I currently have my code ?cycling through by the 5th character but my
rows have variable length and the y can occur in several
2011 Aug 12
1
[LLVMdev] Using sret AND thiscall calling convention
Hi all,
I am trying to generate LLVM IR that calls an external C++ function
returning a structure by copy:
vec3 vec3::Cross(const vec3& iV) const;
Here is the LLVM IR that I am generating for win32 ABI, which says that the
first parameter should be a pointer to the return value:
%vec3 = type <{ float, float, float }>
define void @CPP_Return_Struct(%vec3* %v1, %vec3* %v2) inlinehint
2011 Aug 12
1
[LLVMdev] Using sret AND thiscall calling convention
On Fri, Aug 12, 2011 at 1:11 AM, Damien Gleizes <gleizesd at gmail.com> wrote:
>
> Hi all,
>
> I am trying to generate LLVM IR that calls an external C++ function
> returning a structure by copy:
> vec3 vec3::Cross(const vec3& iV) const;
>
> Here is the LLVM IR that I am generating for win32 ABI, which says that the
> first parameter should be a pointer to the
2013 May 01
0
Thornthwaite Method in R
Hi,Has anybody worked with thornthwaite method to calculate the daily evapotranspiration ? I have used the following code to calculate monthly evaporation but what I need is daily evapotranspiration.
Epot <- thornthwaite(Tave, lat, na.rm = FALSE) # Evaluates evapotranspiration for each month.
Do you have any code which works for daily timestep ? Its more technical question, may be some
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
2012 Jul 13
0
How to simulate the relationship of vegetation and groundwater in Minqin Oasis, Gansu Province, China
*Dear **Madam**/**Sir,*
*What would happen if we irrigate the degraded land using the desalinated
saline water in Minqin Oasis, Gansu Province, China? Can we prevent the
disappearing of Minqin Qasis?*
*
*
*Background:*
*1. **The Minqin Oasis is surrounded by two deserts, Badain Jaran
Desert and Tengger Desert. *
*2. **Water is the root of ecological
2013 Jun 18
1
transform 3 numeric vectors empty of 0/1
Dear all,
Without a loop, I would like transform 3 numeric vectors empty of 0/1 of
same length
Vec1 : transform 1 to A and 0 to ""
Vec2 : transform 1 to B and 0 to ""
Vec3 : transform 1 to C and 0 to ""
to obtain only 1 vector Vec who is the paste of the 3 vectors (Ex : ABC,
BC, AC, AB,...)
Any idea ?
Thank you for your help
--
Michel ARNAUD
2015 May 04
2
[LLVMdev] Incorrect code generated for arm64
Hi all,
I’ve narrowed down a problem in my code to the following test case:
- - - -
typedef struct {float v[2];} vec2;
typedef struct {float v[3];} vec3;
vec2 getVec2();
vec3 getVec3()
{
vec2 myVec = getVec2();
vec3 res;
res.v[0] = myVec.v[0];
res.v[1] = myVec.v[1];
res.v[2] = 1;
return res;
}
- - - -
Compiling this with any level of optimization for arm64 gives incorrect code,
2012 Nov 08
5
map two names into one
Thanks.
Yes. Your approach can identify:
Glaxy ace S 5830 and
S 5830 Glaxy ace
But you can not identify using same program:
Iphone 4S 16 G
Iphone 4S 16G
How should I solve both in same time.
Kind regards,Tammy
[[alternative HTML version deleted]]
2011 Oct 01
2
Returning vector of values shared across 3 vectors?
Help-Rs,
I've got three vectors representing participants:
vec1 <- c(4,5,6,7,8,9,10,11,12,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81)
vec2 <- c (1,2,3,4,5,6,7,8,9,10,11,12,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66)
vec3 <- c (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,52)
I'd
2004 Jul 09
3
Problem with bwplot
Try factor(vec2) in your bwplot() call.
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ernesto Jardim
Sent: Friday, July 09, 2004 9:41 AM
To: Mailing List R
Subject: [R] Problem with bwplot
Hi,
I'm ploting some box-and-whisker plots with bwplot but I'm not getting
any box-and-whiskers ... just dots.
2012 Feb 29
2
[LLVMdev] Expand vector type
Hello,
My input language has support for 3 and 4 element vectors but my target only has support for the latter. The language defines vec3 with the same storage space as vec4 so from a backend perspective they are both the same. I'd really like if I could have LLVM treat vec3 as vec4 but I haven't found out how.
Currently the target has emulated support for vec3 through LLVM. Loads are
2007 Feb 01
2
Losing factor levels when moving variables from one context to another
Hi, there
I'm currently trying to figure out how to keep my "factor" levels for a
variable when moving it from one data frame or matrix to another.
Example below:
vec1<-(rep("10",5))
vec2<-(rep("30",5))
vec3<-(rep("80",5))
vecs<-c(vec1, vec2, vec3)
resp<-rnorm(2,15)
dat<-as.data.frame(cbind(resp, vecs))
2006 Apr 15
1
Removing Rows/Records from a Table
I would like to selectively remove rows from a table.
I had hoped that I could create a table and
selectively add rows with something like
> NewTable<-table(nrow=100, ncol=4)
> NewTable[1,]<-OldTable[10,]
but that doesn't work. The former call gives
> NewTable
ncol
nrow 4
100 1
while the latter call gives a table the length of
OldTable. Making a matrix, m, with the
2012 Feb 29
2
[LLVMdev] Expand vector type
James,
Thanks for your response. I'm working in LLVM 2.7 (I know, it's old) and the default behavior is already promote. This means that for example a call to DAGTypeLegalizer::getTypeAction(v3i32) in my case and I presume in ARM NEON returns TypeWidenVector. From here legalization calls WidenVectorOperand() to process the STORE node and follows the call chain I have on my original email
2015 May 04
2
[LLVMdev] Incorrect code generated for arm64
Thanks Bruce.
> On 4 May 2015, at 13:18, Bruce Hoult <bruce at hoult.org> wrote:
>
> I can confirm that, with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
>
> Very strange!
Yes, that’s what I thought. I’ve also checked the binary downloads for OS X from llvm.org <http://llvm.org/> and get the same broken code from both the 3.5.2 and 3.6.0 releases.
2016 Aug 01
0
new version of package water: Actual Evapotranspiration with Energy Balance Models
Dear R users,
I'm glad to announce the new version of water package (0.5).
As this is my first message to the list, I want to add that this
package provides tools to estimate actual evapotranspiration from
surface energy balance models.
Right now you can run the well-know METRIC model using it. This model
allows to estimate the energy balance using landsat (7 or 5) images
and a weather
2016 Aug 01
0
new version of package water: Actual Evapotranspiration with Energy Balance Models
Dear R users,
I'm glad to announce the new version of water package (0.5).
As this is my first message to the list, I want to add that this
package provides tools to estimate actual evapotranspiration from
surface energy balance models.
Right now you can run the well-know METRIC model using it. This model
allows to estimate the energy balance using landsat (7 or 5) images
and a weather
1999 Dec 16
2
R question
I have the following question, which is elementary but I am unable to
answer.
In a for(i=10) loop, I am trying to represent the 10 1-dimensional vectors
l1, l2,... l10 by some expression that will run through these values.
ie. soppose I want to add l1 + ... + l10
I could go
x <- 0
for(i in 1:10){ x <- x+ l(i)}
This should return x to be the sum of the 10 li's for i from 1 to 10