similar to: merge function

Displaying 20 results from an estimated 10000 matches similar to: "merge function"

2010 Jun 22
5
Displaying Iteration Count
Hello, I'm running a very long for loop that usually takes hours. For my own piece of mind, it would be nice if I could check periodically and see which iteration the loop is on. A line of code that told R to print the iteration number every 100 or 200 iterations would be perfect. Does anyone know something like this? I've never known how to print anything within a for loop before the
2011 Sep 23
4
'save' saved object names instead of objects
Hello, I created an array to hold the results of a series of simulations I'm running: d.eta <- array(0,dim=c(3,3,200)) <simulation goes here and populates the array but it's not important> Then I tried to save the results using this: save(d.eta,file="D:/Simulation Results/sim 9-23-11 deta") When I later tried to reload them using this: d.eta <-
2010 Aug 13
6
Equality of Vectors
Hello, Is there a way to get a single TRUE or FALSE statement from comparing two vectors? For example, c(1,2,3) == c(1,2,3) produces TRUE TRUE TRUE where I would like it to produce only TRUE for use in an if statement. Likewise, when two vectors are not exactly identical (in all elements) I would like a single FALSE result, as opposed to c(1,2,3) == c(1,2,5) TRUE TRUE FALSE Any ideas?
2011 May 17
2
Minimum value by ID
Hello, I have a longitudinal dataset where each individual has a different number of entries. Thus, it is of the following structure: x <- runif(12) id.var <- factor(c(rep("D1",4),rep("D2",2),rep("D3",3),rep("D4",3))) dat <- as.data.frame(x) dat$id.var <- id.var dat > dat x id.var 1 0.9611269 D1 2 0.6738606 D1 3
2011 May 29
1
Setting max. iterations for lmer
Hello, I hate to ask a question which is directly addressed in the documentation, but can someone please give me an example of how to change the maximum number of iterations used by lmer. I'm having a hard time understanding this: control a list of control parameters. See below for details. control a named list of control parameters for the estimation algorithm, specifying only
2011 Nov 09
2
Installing binaries from R-Forge
Hello, I'm attempting to install the splm package from R-Forge. https://r-forge.r-project.org/R/?group_id=352 The page says, "In order to successfully install the packages provided on R-Forge, you have to switch to the most recent version of R..." It later says "To install this package directly within R type: install.packages("splm",
2012 Mar 08
1
Panel models: Fixed effects & random coefficients in plm
Hello, I am using {plm} to estimate panel models. I want to estimate a model that includes fixed effects for time and individual, but has a random individual effect for the coefficient on the independent variable. That is, I would like to estimate the model: Y_it = a_i + a_t + B_i * X_it + e_it Where i denotes individuals, t denotes time, X is my independent variable, and B (beta) is the
2011 Feb 25
1
Hierarchical Power Analysis
Hello, A colleague is trying to do a fairly complicated power analysis for a project. The project would be evaluating random assignment to one of three conditions within each of 8 sites. The dependent variable would be binary (we do not care at this point whether it would be analyzed with logit or probit). We can simulate the data in a bunch of iterations and do analyses in each iteration, but
2010 Apr 19
2
ecdf
Hello, I'd like to plot an empirical cumulative distribution function, except instead of the fraction of values < x, I'd like the fraction of values > x. I think this can be done using the ecdf function in {Hmisc}. I installed the package and loaded it. However, when following the example given in the documentation, I get an error: x <- rnorm(100) ecdf(x,what='1-F')
2010 Mar 11
1
VAR with contemporaneous effects
Hi, I would like to estimate a VAR of the form: Ay_t = By_t-1 + Cy_t-2 + ... + Dx_t + e_t Where A is a non-diagonal matrix of coefficients, B and C are matricies of coefficients and D is a matrix of coefficients for the exogenous variables. I don't think the package {vars} can do this because I want to include contemporaneous cross-variable impacts. So I want y1_t to affect y2_t and I
2011 Apr 24
1
merge with origin information in new variable names
Dear R-list, Here is my simple question, I have n data frames that I would like to merge, but I can't figure out how to add information about the origin of the variable(s). Here is my problem, DF.wave.1 <- data.frame(id=1:10,var.A=sample(letters[1:4],10,TRUE)) DF.wave.2 <- data.frame(id=1:10,var.M=sample(letters[5:8],10,TRUE)) DF.wave.3 <-
2011 Jul 06
3
Tables and merge
----- Original Message ----- From: "Silvano" <silvano at uel.br> To: <r-help at r-project.org> Sent: Thursday, June 30, 2011 9:07 AM Subject: Tables and merge > Hi, > > I have 21 files which is common variable CODE. > Each file refers to a question. > > I would like to join the 21 files into one, to construct > tables for each question by CODE. >
2018 Jan 08
1
Replace NAs in split lists
OPS! Sorry i did indeed posted the code in HTML; should have known better. ifelse(is.na(z$Value),z$Value[!is.na(z$Value)][1],z$Value)z}) error. unexpected symbol in sdf2 On Mon, Jan 8, 2018 at 11:44 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > I don't know. You seem to be posting in HTML so your code is mangled. Can you post plain text and use the reprex package to
2010 Apr 12
1
Strange results from Multivariate Normal Density
Hello, I'm using dmnorm from the package {mnormt} and getting strange results. First, according to the documentation, dmnorm should return a vector of densities, and I'm only getting one value returned (which is what I would expect). I've been interpreting this as the joint density of all values in the x vector (which is what I want). Should a vector of densities be returned, and if
2012 Apr 23
2
.rda vs. .RData
Are they the same with .RData being the newer format?? Thanks, ...Tao
2013 Oct 10
1
Rcpp and mclapply
Dear all, I have an R script that uses Rcpp, and I have been trying to parallelize it using mclapply (I tried with the multicore and the parallel library) Sometimes (not always, interestingly), the CPU use for each core drops, usually so that the total over all cores reaches 100%, i.e., as fast as if using just one single core fully. I tried my code directly from within emacs, and also using a
2018 Mar 01
3
how to make row.names based on column1 with duplicated values
Dear All, Suppose I have a dataframe like this with many thousands rows all with different names: data.frame(gene=c("a","b","c","d","c","d","c","f"),value=c(20,300,48,55,9,2,100,200)), I want to set column "gene" as row.names, but there are duplicates (c, d), which I want to transform into this as row names:
2013 Oct 12
1
lmerTest
Hi, I'm trying to user lmer function from lmerTest package because, if I understood correectly, it allows to make better inference than lmer method from lme4 package. However, whatever I do I keep getting this error: Error in lme4::lFormula(formula = mark ~ ssCount + sTime+ : rank of X = 1660 < ncol(X) = 1895 any ideas what could be a problem? thanks, Srecko [[alternative HTML
2012 Sep 07
3
Problem with duplicates in row.names
Hello, I am drawing a heatmap with hundreds of genes. Everything work fine, except when I want to had the name of the genes as the row.names with >row.names (a)<-a$Name And there''s this things that duplicate are not allowed... How can I do to allow duplicates ??? I don''t have the choice I can''t just have numbers . Thanks for your help, I am new in R ... Fred
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