Displaying 20 results from an estimated 30000 matches similar to: "combine 2 data frames with missing values"
2006 Sep 26
2
creation of new variables
Hello All,
I have 8 variables named
a b c d e f g h
I need to create four variables from these 8 vraibles in R.
the new variables are ab,cd,ef,gh.
Can anyone pleas help me
thanks,
Pratap
---------------------------------
[[alternative HTML version deleted]]
2008 Jan 29
1
Form Pairs of Variables for a paired t-test
Hi Users,
This is regarding the paired t-test. I have 5 variables (say) Data$v1,Data$v2,Data$v3,Data$v4,Data$v5 in my data frame. Now, I need to perform a paired t-test on all the possible 10 pairs.How do I set up the pairs table directly and pass those variables in to t-test.
Thanks in advance,
Pratap
---------------------------------
Now you can chat without
2007 Oct 10
2
Deleting the White Space in an R graph
Hi All,
Is there a way we can delete the empty white space around when we generate any graph/map using R? The final output should be onaly a picture with no white spaces all around.
Cheers,
Pratap
---------------------------------
5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
[[alternative HTML version deleted]]
2007 Aug 20
3
Differentiation
Hi,
Could anyone tell me what is the command used in R to do
1. Differentiation
2. Newton Raphson method (Numerical Analysis in general...)
Are there any packages separately for this?
Thanks for your help!
BR, Shubha
[[alternative HTML version deleted]]
2006 Oct 04
1
" Error in "names<-.default"
Hi All,
Can some one explain me the following error-
" Error in "names<-.default"
'names' attribute [1199] must be the same length as the vector [17]".
Thanks,
Pratap
---------------------------------
[[alternative HTML version deleted]]
2006 Oct 04
2
convert vector to matrix
Hi All,
I have vector containing 10 elements(odservations). I need to put this into a matrix, where the matrix should contain only one column.
I need this to be done using the cbind command because in the final table I should have a column of attributes( from adifferent vector) and a column of vectors from the matrix above
Please suggest me how this can be done
Thanks and
2013 Feb 01
4
Filter according to the latest data
Hello together,
i have a data.frame, like this one:
No. Change Date
A 123 final 2013-01-15
B 123 error 2013-01-16
C 123 bug fixed 2013-01-17
D 111 final 2013-01-12
and now a want a new data.frame which includes
2006 Sep 20
1
problem coercing truncated character vector to levels
Dear R wizes,
I have a data.frame of species abundances with column names consisting
of 4 letter codes then an underscore and a number like this:
abco_1, abco_2, abco_3, psm_1, psme_2, psme_3, etc.
I would like to get an identifier for all the abco, and psme and other
species etc.
I used
spec.fact<-substring(names(spec.count),1,4)
To make a vector of the first 4 letters of
2010 Aug 04
3
merge two data frames
Dear list,
here are my two data frames:
av <-
structure(list(DESCRIPTION = c("COFFEE C Sep/10", "COPPER Sep/10",
"CORN Dec/10", "CRUDE OIL miNY Sep/10", "GOLD Aug/10", "HENRY HUB
NATURAL GAS Sep/10",
"PALLADIUM Sep/10", "SILVER Sep/10", "SOYBEANS Nov/10", "SPCL HIGH
GRADE ZINC USD",
"SUGAR
2009 Sep 10
2
Merge data frames but prefer values in one
Hello everyone,
My problem is better explained with an example:
> x=data.frame(a=1:4,b=1:4,c=rnorm(4))
> x
a b c
1 1 1 -0.8821089
2 2 2 -0.7082583
3 3 3 -0.5948835
4 4 4 -1.8571443
> y=data.frame(a=c(1,3),b=3,c=rnorm(2))
> y
a b c
1 1 3 -0.273155973
2 3 3 0.009517862
Now I want to merge x and y by columns a and b, hence creating a
data.frame with all
2009 Jan 13
2
NA-values and logical operation
Dear list,
as a result of a logical operation I want to assign
a new variable to a DF with NA-values.
z <- data.frame( x = c(5,6,5,NA,7,5,4,NA),
y = c(1,2,2,2,2,2,2,2) )
p <- (z$x <= 5) & (z$y == 1)
p
z[p, "p1"] <-5
z
# ok, this works fine
z <- z[,-3]
p <- (z$x <= 5) & (z$y == 2)
p
z[p, "p2"] <-5
z
# this failed... - how
2008 Dec 29
4
Merge or combine data frames with missing columns
Hi R-experts,
suppose I have a list with containing data frame elements:
[[1]]
(Intercept) y1 y2 y3 y4
-6.64 0.761 0.383 0.775 0.163
[[2]]
(Intercept) y2 y3
-3.858 0.854 0.834
Now I want to put them into ONE dataframe like this:
(Intercept) y1
2017 Jun 23
4
R version 3.3.2, Windows 10: Applying a function to each possible pair of rows from two different data-frames
For certain reason, the content was not visible in the last mail, so posting it again.
Dear Members,
I have two different dataframes with a different number of rows. I need to apply a set of functions to each possible combination of rows with one row coming from 1st dataframe and other from 2nd dataframe. Though I am able to perform this task using for loops, I feel that there must be a more
2012 Mar 28
6
How to get all possible combinations?
Dear all, suppose I have a vector with elements as:
Vec <- c(2,3,4,5,6)
Now I want to have all possible combination of length 3 using those
elements and without any repetition. Like, I want to have 1
possibility like 2-3-4 but not 3-2-4.
Can somebody guide me how to achieve that in R?
Thanks for your help.
2014 Jul 25
2
Does openssh supports multi-channeling ?
Hi All,
In openssh, do we support multi-channeling?
Rather than opening a new TCP socket for each SSH connection, all the SSH
connections are multiplexed into one TCP connection.
If so, from which version , do openssh supports it?
Thanks
Ravi Pratap
2005 Feb 03
9
subset data.frame with value != in all columns
I am trying to extract rows from a data.frame based on the
presence/absence of a single value in any column. I've figured out how
to do get the positive matches, but the remainder (rows without this
value) eludes me. Mining the help pages and archives brought me,
frustratingly, very close, as you'll see below.
My goal: two data frames, one with -99 in at least one column in each
row,
2020 May 25
3
child killed by signal 6
Hello,
from time to time I keep getting problems with some emails causing
signal 6. I've already reported those, but it seems not to be easy to
find the cause. From the logs, it seems to occur in sieve implementation.
I've checked the email envelopes tody by accident, probably this part of
my telnet session might help:
a11 fetch 1 all
* 1 FETCH (RFC822.SIZE 16750 INTERNALDATE
2007 Mar 08
2
Removing duplicated rows within a matrix, with missing data as wildcards
I'd like to remove duplicated rows within a matrix, with missing data
being treated as wildcards.
For example
> x <- matrix((1:3), 5, 3)
> x[4,2] = NA
> x[3,3] = NA
> x
[,1] [,2] [,3]
[1,] 1 3 2
[2,] 2 1 3
[3,] 3 2 NA
[4,] 1 NA 2
[5,] 2 1 3
I would like to obtain
[,1] [,2] [,3]
[1,] 1 3 2
[2,] 2 1 3
2017 Jun 23
0
R version 3.3.2, Windows 10: Applying a function to each possible pair of rows from two different data-frames
You appear to be trying to write C code in R. Don't do this. If you
can trade off space for efficiency, the calculation can be easily
vectorized (assuming I correctly understand what you want to do, of
course).
set.seed(135) ## for reproducibility
D1<-data.frame(x=1:5,y=6:10,z=rnorm(5))
D2<-data.frame(x=19:30,y=41:52,z=rnorm(12))
D.all <-merge(D1,D2, by.x=NULL,by.y=NULL) ##
2014 Mar 17
1
protocol error : expected control record
Hi All,
During scp, I am seeing this message
protocol error : expected control record
This message came because scp sink was expecting the message starting from
'C' or 'D' , something like C0644 299 group or D0755 0 docs but during dns
query we were printing "Using IP address" message on the stdout.
So , the message in the buffer was "Using IP address" and