similar to: combine two data-frames into one

Displaying 20 results from an estimated 10000 matches similar to: "combine two data-frames into one"

2008 Nov 24
3
multiple plots in R
Hi, I just try to draw multiple plots in one page using R, I used par command. For example I have 7 plots, but instead of arranging them in the default way plot1 plot2 plot3 plot4 plot5 plot6 plot7 I want them in this order plot1 plot2 plot3 plot4 plot5 plot6 plot7 Could somebody tell me how to do this, please? Thanks so many. Suyan
2009 Jul 02
5
save the result into a word file
Hi, everyone: I forget on how to save a result from R as a word document. For example, if I run the linear regression and want to save the result: summary(lm(y~x) in a word file. So I can show it later to my clients. Any idea on how to do this? Thanks a lot, Suyan
2008 Oct 28
2
abind
I am trying to combine two arrays with different dimensions into one. For example The first one is 1 2 3 4 5 6 The second one is 7 8 9 10 The resulted one would be like , , 1 1 2 3 4 5 6 , , 2 7 8 9 10 I used abind to do this, but failed. Could somebody please let me know how to do this in R? Thanks so many. Suyan
2008 Aug 22
2
boxplot
Hi, I just made a boxplot but I want to change the thickness of the line used for the median to look a little thinner. Could anyone please help me figuring out the R-code to do it? Thanks, I really appreciate it. Suyan
2009 Jul 02
1
skip the error to continue the logistic regression in a loop
Hi, everyone: I am running logistic regression on a bunch of variables using apply command. But an error occurs, the whole process stops. I am wondering if anyone knows how to skip this error and to continue the regression for the rest of variable. What I did is that first confine a function to the logistic regression, then use apply(data, 2, reg.fun) Then I got an error which is [1]
2008 Feb 01
3
Phase Shift
Is there any implementation in R for finding the phase shift between two continuous signals. I would like to find the average phase shift for tow signals over two years. thanks Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted
2009 May 29
2
Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified
I think I am using the improved version of setdiff(...) that handles data.frames, so I think some odd behavior was expected but this one is escaping me. It appears that the the addition of duplicate entries is not caught by the setdiff(...). Is this expected behavior? If so, is there another method or approach that should be used to identify duplicate row entries between two different data
2009 Sep 19
1
Re-order columns
Dear R'sians, Would really appreciate if you could suggest a more efficient way to order the columns of a dataset. The column names of the dataset contain indices separated by a period. Following are examples of my code and the dataset. oC <- function(tg=x2) { lth <- length(grep("T",names(tg))) thix <-
2009 Aug 25
2
Removing objects from workspace
Hi all, I am currently woking with hundreds of objects in workspace and whenever I invoke ls() to observe the names of the objects, there are too much of unnecessary variables. For example, if I only require say 3 or 4 objects from hundreds of objects in workspace, are there any methods that may do the job? I have tried rm(-c(x,xx,xxx)), but no luck.. Your feedback in this problem would be
2009 May 27
5
How to exclude a column by name?
Given an arbitrary data frame, it is easy to exclude a column given its index: df[,-2]. How to do the same thing given the column name? A naive attempt df[,-"name"] did not work :)
2017 Jul 16
0
Arranging column data to create plots
On Sat, 15 Jul 2017, Michael Reed via R-help wrote: > Dear All, > > I need some help arranging data that was imported. It would be helpful if you were to use dput to give us the sample data since you say you have already imported it. > The imported data frame looks something like this (the actual file is > huge, so this is example data) > > DF: > IDKey X1 Y1 X2 Y2
2007 Apr 28
6
Determine how many documents a term occurs in
Is there a fast way to determine how many documents a term occurs in, besides iterating through every document with TermDocEnum? -- Best regards, Stian Gryt?yr
2005 Feb 09
1
efficient R code
Last Friday, Gregory Chaitin (http://www.umcs.maine.edu/~chaitin/lm.html) mentioned that there can be no proof that a given code is the shortest for a problem, even within a language. Still, the script below, a replacement of the "TDT", one of the most frequently used tests in genetics (http://mustat.rockefeller.edu under "downloads") may get close. It contains a few
2008 Apr 28
5
Combine Values into a Vector or List
Hi all, I have the following x1<-paste("A", 1:6, sep = "") x2<- round(rgamma(6,2,1)) x3<-paste("B", 1:6, sep = "") x4<- round(rgamma(6,2,1)) data1 <- data.frame(x1,x2,x3,x4) I would like to get data2 <- c(A1=4, A2=1, A3=0,...) Is there any standard for such a case? Thank you very much in advance, Diego
2007 Dec 10
1
setdiff for data frames
Hello, I have been interested in setdiff() for data frames that operates row-wise. I looked in the documentation, mailing lists, etc., and didn't find exactly the right thing. Given data frames A, B with the same columns, the goal is to extract the rows that are in A, but not in B. Of course, one can usually do setdiff(rownames(A), rownames(B)) but that is cheating. :-) I played around a
2017 Jul 16
3
Arranging column data to create plots
Dear All, I need some help arranging data that was imported. The imported data frame looks something like this (the actual file is huge, so this is example data) DF: IDKey X1 Y1 X2 Y2 X3 Y3 X4 Y4 Name1 21 15 25 10 Name2 15 18 35 24 27 45 Name3 17 21 30 22 15 40 32 55 I would like to create a new data frame with the following NewDF: IDKey X Y Name1 21 15 Name1
2008 May 13
2
array dimension changes with assignment
Why does the assignment of a 3178x93 object to another 3178x93 object remove the dimension attribute? > GT <- array(dim = c(6,nrow(InData),ncol(InSNPs))) > dim(GT) [1] 6 3178 93 > SNP1 <- InSNPs[InData[,"C1"],] > dim(SNP1) [1] 3178 93 > SNP2 <- InSNPs[InData[,"C2"],] > dim(SNP2) [1] 3178 93 > dim(pmin(SNP1,SNP2)) [1] 3178 93
2013 Aug 09
1
a fast table() for the 1D case
Hi, table1D() below can be up to 60x faster than base::table() for the 1D case. Here are the detailed speedups compared to base::table(). o With a logical vector of length 5M: 11x faster (or more if 'useNA="always"') o With factor/integer/numeric/character of length 1M and 9 levels (or 9 distinct values for non-factors):
2005 May 17
4
Combinations with two part column
Dear R-helpers, I am a beginner using R. This is the first question in this list. My question, Is there possible to make combinations with two part column? If I have a number 1,2,3,4,5,6,7,8. I need the result something like below: 1,2,3,4,5 6,7,8 1,2,3,4,7 5,6,8 2,3,4,5,6 1,7,8 1,2,3,6,7 4,5,8 1,2,3,4,8 5,6,7 3,4,6,7,8 1,2,5 .... I would be very happy if anyone could
2005 Mar 15
6
New Beta version of Rake for Rails Users ... Fix for Ruby 1.8.2 unit test bug
I have a new version of Rake that I''m (almost) ready to release. But before I make an official release, I would like some Rails folk to give it it try ... Why? Because it contains a workaround for the notorious Ruby 1.8.2 test/unit bug. Using this version of rails, it should be possible to unit test a rails app without patching the Ruby 1.8.2 test/unit library. Where to get it?