search for: cmora

Displaying 9 results from an estimated 9 matches for "cmora".

Did you mean: mora
2013 Mar 27
9
conditional Dataframe filling
Hi everyone: This may be trivial but I just have not been able to figure it out. Imagine the following dataframe: a b c d TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE I would like to create a new dataframe, in which TRUE gets 0 but if false then add 1 to the cell to the left. So the results for the example above should be something like: a b c
2012 Jul 24
5
First value in a row
Hi. This is likely a trivial problem but have not found a solution. Imagine the following dataframe: Lat Lon x1 x2 x3 01 10 NA NA .1 01 11 NA .2 .3 01 12 .4 .5 .6 I want to generate another column that consist of the first value in each row from columns x1 to x3. That is NewColumn .1 .2 .4 Any input greatly appreciated, Thanks, Camilo Camilo Mora, Ph.D.
2013 Mar 13
3
loop in a data.table
Hi everyone, I have a data.table called "data" with many columns which I want to group by column1 using data.table, given how fast it is. The problem with looping a data.table is that data.table does not like quotations to define the column names (e.g. "col2" instead of col2). I found a way around which is to use get("col2"), which works fine but the
2013 Mar 02
3
replace zeros for NA in a column based on values of another column
Hi everyone, Imagine that I have a data frame with four columns: data<- a b c d 0 1 1 0 1 1 1 1 1 0 0 1 I want to replace the zeros in columns a:b for NA only for the rows in which column d are zero. So a b c d NA 1 1 0 1 1 1 1 1 0 0 1 I am trying
2004 Apr 14
4
Non-Linear Regression Problem
Dear all, I was wondering if there is any way i could do a "Grid Search" on a parameter space using R (as SAS 6.12 and higher can do it) to start the Newton-Gauss Linearization least squares method when i have NO prior information about the parameter. W. N. Venables and B. D. Ripley (2002) "Modern Applied Statistics with S", 4 th ed., page 216-7 has a topic
2010 Aug 14
1
confidence Intervals for predictions in GLS
Hi everyone: Is there a function in R to calculate the confidence intervals for the predictions of a GLS(Generalized Least Square) model? The function "predict" gives confidence intervals for the predictions of other types of models (lm, glm, etc) but not gls. Any input will be much appreciated, Best, Camilo Camilo Mora, Ph.D. Department of Biology Dalhouisie University
2014 Oct 12
1
Is xyz point inside 3d convex hull?
Hi everyone, I wonder if there is a code in r that can generate a 3d convex hull from a data-frame containing 3 columns and then use another database with the same three columns and for each row determine if the xyz point is inside or not the convex hull generated with the first database? The package geometry allows to calculate a hull and it's volume. I was planning to calculate the volume
2012 Sep 02
1
why variations in accuracy between R to ARCGIS for the same point reprojection?
Hi everyone, I wonder if anyone knows the reason why the outputs of the same reprojection in r and arcgis are different?. The magnitude of the change can be up to 40 km in the poles. Basically, I have a database of points equally separated by one degree over the globe. In ARCGIS, I am projecting the data in GCS-WGS-1984 and then reprojected it to Berhmann to ensure equal area
2013 Mar 23
1
Error with custom function in apply: ”Error in FUN(newX[, i], ...) : unused argument(s) (newX[, i])”
Hi everyone, I wonder if I can get your help using a custom function in apply. Imagine the following dataframe called "data": LowLim HighLim A1 A2 A3 A4 4 6 3 4 5 6 4 6 4 5 5 6 2 3 1 4 2 3 2 3 NA NA NA NA We have created a custom function (see below) that takes the values in a given row between columns A1 to A4 to see if they are outside the limits in the same