similar to: loop in a data.table

Displaying 20 results from an estimated 2000 matches similar to: "loop in a data.table"

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 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
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
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
2009 Aug 31
2
write file to date-stamped folder
Hello, I would like to be able to write all files produced on one day to an output directory with that date stamp, or alternatively stamp the date in the filename. So that if i run the same code the next day the files will not be overwritten. here's what i have to start with: baseDir = getwd() outputDir = paste(baseDir,"/OutputData-", Sys.Date(),sep="") and lets say i
2020 Sep 24
1
How to use `[` without evaluating the arguments.
Hello R-devel, I am currently attempting to implement an API similar to data.table wherein single bracket subsetting can accept an unquoted expression to be evaluated in the context of my object. A simple example from the data.table package looks like this: DT <- data.table(col1 = c('a', 'b', 'c'), col2 = c('x', 'y', 'z')) DT[col1 ==
2013 Dec 04
2
AYUDA CON ERROR CON LA LIBRERIA PCA
Cordial saludo adjunto la base de datos y el script: eu60<- read.csv(file.choose(), header=T, sep=";", dec=".", row.names=1) eu60.pca <- PCA(eu60, quali.sup=19) eu60.data <- cbind.data.frame(eu60[,19], eu60.pca$ind$coord) eu60.ellipse <- coord.ellipse(eu60.data, bary=TRUE) plot.PCA(ellipse=eu60.ellipse, cex=0.8) El 4 de diciembre de 2013 17:35, Camilo Calle
2008 Mar 15
3
[HELP]No :secret given to the #protect_from_forgery call
I am starting to BDD. When specing the controller I want to test for object creation: it "deberia crear una nueva persona en post create" do Usuario.should_receive(:create).with({:nombre => "camilo", :clave => "secreta", :tipo => "administrador"}).and_return(@usuario) post ''create'', {:usuario => {:nombre =>
2007 Feb 14
1
Moving data from ext3 to ocfs2 (san to san)
Skipped content of type multipart/signed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-keys Size: 1759 bytes Desc: Clave PGP =?us-ascii?b?cMO6YmxpY2E=?= Url : http://oss.oracle.com/pipermail/ocfs2-users/attachments/20070214/fc85b2b9/attachment-0001.bin
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos Me gustaría saber si me pueden ayudar con lo siguiente. Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos variables. Visualmente no se notan las diferencias porque la gráfica de la derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo hacer para que las dos gráficas muestren la misma escala en el eje Y, es decir, que las dos lleguen a 60?
2013 Dec 04
2
AYUDA CON ERROR CON LA LIBRERIA PCA
Hola, ¿qué tal? Tu problema es que tienes agrupaciones de países (p.e., ASIA_MERIDIOL) con un solo respresentante. Las matrices con las que construyes las elipses son degeneradas (más bien, no existen: sospecho que tienen que ver con la covarianza... ¿de un único caso?). Elimina las agrupaciones triviales. Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El día 4 de diciembre de
2010 Jun 09
1
about virDomainSave and virDomainRestore
Hi there, There is some special reason to require a virConnectPtr param in virDomainRestore ? Regards, Camilo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100609/69932c54/attachment.htm>
2014 Jan 11
2
Consulta sobre tildes en español
Estoy trabajando en dos archivos .txt con el comando setdiff. Infortunadamente se me produce un resultado que no he podido controlar a pesar de cargar el comando system("defaults write org.R-project.R force.LANG en_US.UTF-8") para normalizar el sistema UTF-8 [85]"geomorfolog\222a" [91] "habitu\216s" [121] "\352ndice" Mil
2009 Nov 19
1
problem post request with RCurl
Hi, I am trying to use a CGI service (Pubchem PUG) via RCurl and am running into a problem where the data must be supplied via POST - but I don't know the keyword for the argument. The data to be sent is an XML fragment. I can do this via the command line using curl: I save the XML string to a file called query.xml and then do curl -d @query.xml
2005 Nov 03
4
nlme questions
Dear R users; Ive got two questions concerning nlme library 3.1-65 (running on R 2.2.0 / Win XP Pro). The first one is related to augPred function. Ive been working with a nonlinear mixed model with no problems so far. However, when the parameters of the model are specified in terms of some other covariates, say treatment (i.e. phi1~trt1+trt2, etc) the augPred function give me the following
2013 Oct 24
2
R: Optional argument to be used in a subset function
I'm writing a function that needs an optional variable. If the variable is given, then a subset must be made using that variable, but if the variable is not given the subset must be done using all the values for that variable (ignoring that variable). Something like this: *band <- function(file, fruit = "apple", optional=TRUE) {* *data <- read.csv(file)* *a <-
2006 May 31
4
how to decrease answer time !
Dear list i am using Asterisk 1.2.5 with A@H . here is my problem. if i dial a number (consider 79) i have to wait around 20 seconds before my Asteisk box response. now i want to decrease this waiting time . any idea how to do that ? thanks Salaque
2010 Feb 16
2
build libvirt on Mac OSX 10.6
Hi, Anybody know how to build libvirt on Mac OSX 10.6 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100215/ee529872/attachment.htm>