similar to: Merge data frames but prefer values in one

Displaying 20 results from an estimated 1000 matches similar to: "Merge data frames but prefer values in one"

2010 Jan 28
1
quartz() and dpi
Hello all, I am using quartz (on OS X obviously) to produce PDFs and PNGs from my plots, for later inclusion in LaTeX. I am typically using something like: plot(0) dev.print(quartz, file="foo.pdf", width=5, height=3) dev.print(quartz, file="foo.png", width=5, height=3, dpi=72) I want the sizes of the PDF and PNG to be *equal* in *inches*, which works with dpi=72. However,
2010 Nov 22
1
Plotting a cloud/fog of variable density in rgl
Hi everyone, I want to plot a 3D interpolation of the concentration of aquatic organisms. My goal would be to have the result represented as clouds with a density proportional to the abundance of organisms, so that I could fly (well, swim actually ;) ) through the scene and see the patches here and there. Basically, I want to do something like this: http://www.youtube.com/watch?v=27mo_Y-aU-c but
2009 Sep 11
3
For sending my R package as part of R-project
To Whom It May Concern: I have an R package and want to put this package be part of R-project and available to anyone who is interested in. The R package is created for my paper, titled "Acceptance Sampling Plans from Truncated Life Tests Based on the Birnbaum-Saunders Distribution for Percentiles". The paper has been accepted by Communications in Statistics: Simulation and
2008 Jan 18
1
Selecting rows conditionally between 2 data.frames
Hello everyone, I have two data.frames that look like calib: place zoom scale left 0.65 8 left 0.80 5.6 left 1.20 3 right 0.65 8.4 right 0.80 6 right 1.20 2.9 X: ... place zoom .... ... left 0.80 .... ... left 1.20 .... ... right 0.65 .... ... NA NA .... ... right 0.8 .... ... left 1.20 .... and I want to get the corresponding values of 'scale' in a new column
2007 Dec 13
2
use ggplot in a function to which a column name is given
Hi everyone, Hi ggplot users in particular, ggplot makes it very easy to plot things given their names when you use it interactively (and therefore can provide the names of the columns). qplot(x,foo,data=A) where A has columns (x,y,foo,bar) for example but I would like to use this from inside a function to which the name of the column is given. I cannot find an elegant way to make this
2007 May 31
3
Problem with Weighted Variance in Hmisc
The function wtd.var(x,w) in Hmisc calculates the weighted variance of x where w are the weights. It appears to me that wtd.var(x,w) = var(x) if all of the weights are equal, but this does not appear to be the case. Can someone point out to me where I am going wrong here? Thanks. Tom La Bone [[alternative HTML version deleted]]
2009 Mar 22
3
'require' equivalent for local functions
Hello everyone, I often create some local "libraries" of functions (.R files with only functions in them) that I latter call. In scripts that call a function from such library, I would like to be able to test whether the function is already known in the namespace and, only if it is not, source the library file. I.e. what `require` does for packages, I want to do with my local
2007 Sep 20
1
ggplot and xlim/ylim
Hello everyone, I am (happily) using ggplot2 for all my plotting now and I wondered is there is an easy way to specify xlim and ylim somewhere when using the ggplot syntax, as opposed to the qplot syntax. Eg. qplot(data=mtcars,y=wt, x=qsec,xlim=c(0,30)) <-> ggplot(mtcars, aes(y=wt, x=qsec)) + geom_point() + ??? Indeed the ggplot syntax is in general more flexible and powerful and
2007 Jul 30
2
apply, lapply and data.frame in R 2.5
Hello everyone, A recent (in 2.5 I suspect) change in R is giving me trouble. I want to apply a function (tolower) to all the columns of a data.frame and get a data.frame in return. Currently, on a data.frame, both apply (for arrays) and lapply (for lists) work, but each returns its native class (resp. matrix and list): apply(mydat,2,tolower) # gives a matrix lapply(mydat,tolower) # gives
2008 Feb 05
2
Incomplete ouput with sink and split=TRUE
Dear List, I am trying to get R's terminal output to a file and to the terminal at the same time, so that I can walk through some tests and keep a log concurrently. The function 'sink' with the option split=TRUE seems to do just that. It works fine for most output but for objects of class htest, the terminal output is incomplete (the lines are there but empty). Here is an
2007 May 18
3
lapply not reading arguments from the correct environment
Hello, I am facing a problem with lapply which I ''''think''' may be a bug. This is the most basic function in which I can reproduce it: myfun <- function() { foo = data.frame(1:10,10:1) foos = list(foo) fooCollumn=2 cFoo = lapply(foos,subset,select=fooCollumn) return(cFoo) } I am building a list of dataframes, in each of which I want to keep only column
2007 Jan 30
2
rbind-ing list
hi, i have a list of data.frame that has same structure. i would like to know a efficient way of rbind-ing it. right now, i write: n = length(temp) # 'temp' is a list of data.frames temp2 = data.frame() for (i in 1:n) temp2 = rbind( temp2, temp[[i]]) return(temp2) but this is not an efficient way since we keeping overwriting temp2. i wonder if there's faster way. thanks --
2011 Jan 21
0
Marginality rule between powers and interaction terms in lm()
Dear all, I have a model with simple terms, quadratic effects, and interactions. I am wondering what to do when a variable is involved in a significant interaction and in a non-significant quadratic effect. Here is an example d = data.frame(a=runif(20), b=runif(20)) d$y = d$a + d$b^2 So I create both an simple effect of a and a quadratic effect of b. m = lm(y ~ a + b + I(a^2) + I(b^2) +
2007 Sep 30
1
clipping viewports
Dear useRs, Why are the rotated blue and yellow boxes in the example below clipped outside of 6 x 6 inch window in the middle of the page?? Where does the 6 x 6 inch window come from? I would like to make use of the entire page. > library(grid) > pdf(file = "FarmMaps.pdf", paper = "a4") > pushViewport(viewport( + width = unit(7.6, "inches"), height =
2008 Jan 21
1
sorting in 'merge'
Hello everyone, I've been advised to use merge to extract information from two data.frames with a number of common columns, but I cannot get a grasp on how it sorts the result. With sort=FALSE, I would expect it to give the result back sorted exactly as the input was but it seems it is not always the case, especially when there are repeats in the input. For example: > a =
2007 May 21
1
plot(......,new=T) vs. par(new=T)
Hello everybody, This is probably a classic but I cannot find an answer to this on the mailing list (i.e. with a google search restricted to the mailing list archive). Setting: par(new=T) plot(x,y) works but plot(x,y,new=T) doesn't while it is said in plot's help that ... arguments are passed to par. What am I missing? JiHO --- http://jo.irisson.free.fr/
2020 Jul 01
2
How to get information about data dependencies?
Hello, I had a question similar to this one in the link below. http://lists.llvm.org/pipermail/llvm-dev/2015-January/080589.html In addition, if we can't get RAW dependencies information using the provided llvm tools, how would I write a pass for it? Are there any helpful resources? Thanks, Jiho -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Sep 27
3
Plotting from different data sources on the same plot (with ggplot2)
Hello everyone (and Hadley in particular), I often need to plot data from multiple datasets on the same graph. A common example is when mapping some values: I want to plot the underlying map and then add the points. I currently do it with base graphics, by recording the maximum region in which my map+point will fit, plotting both with these xlim and ylim parameters, adding par (new=T)
2007 May 21
1
Comparing multiple distributions
Hello eveybody, I am studying the vertical distribution of plankton and want to study its variations relatively to several factors (time of day, species, water column structure etc.). So my data is special in that, at each sampling site (each observation), I don't have *one* number, I have *several* numbers (abundance of organisms in each depth bin, I sample 5 depth bins) which
2010 Mar 18
2
recommendations on use of -> operator
I have never used -> but I noticed at http://github.com/jiho/r-utils/blob/master/beamer_colors.R that some people do. In fact, the above-named code has a sort of elegance about it (except for the use of "=" for assignment...). To my eye, -> calls to mind a type of assignment that is meant to stand out. For example, perhaps it would make sense to use -> to assign