Displaying 20 results from an estimated 6000 matches similar to: "Trying to write Merge for more data.frames - Error in match.names(clabs, names(xi))"
2011 Apr 06
1
Error in match.names(clabs, names(xi))
Hi Guys,
I have this part of a program:
library(survival)
Gastric <- cbind.data.frame(Gp=c(rep(1,45),rep(0,45)), ### 2nd gp 0
time=c(1,63,105,129,182,216,250,262,301,301,342,354,356,358,
380,383, 383,388,394,408,460,489,499,523,524,535,562,569,675,676,
748,778,786,797,955,968,1000,1245,1271,1420,1551,1694,2363,2754,2950,
2007 Nov 25
1
Constructin a call of function including permutation of column names - how to escape parentheses?
Dear R-users,
I would like to construct a list of arguments for a function in a format
function (list(item1=c("A","B"), item2=c("B","C")), item3=...):
The individual vectors in the list are permutations of colnames of a
dataframe.
The trouble is that I am not able to handle escaping of parentheses
correctly.
I was trying the following:
library(gregmisc)
2007 Mar 05
3
Rbind with data frames -- column names question
As part of my work, I am trying to append matrices onto data frames.
Naively I assumed that when rbinding a data.frame and matrix, the matrix
would be coerced and appended, keeping the names from the data frame.
Clearly, I am not fully understanding the process by which rbind works.
Example code:
> A<-data.frame(1,1,1); names(A)=letters[1:3] ; B<-matrix(0,2,3)
> rbind(A,B)
2008 Mar 23
1
Exporting of R dendrogram object in the format of Eisen´s Cluster
Dear R-users,
I would like to use Cluster 3.0 for my data because of its zooming, link out
and copy (gene)labels into clipboard options. Unfortunately the program
doesnt allow use of the distance metrics I would like to use. I would like
to ask if there is some library, that allows saving dendrogram object in the
format readable by Cluster.
Thank you for reply.
--
2008 Jun 21
1
passing arguments to a function problem
Dear R-users,
is there some way how to pass various colnames to the following code for
sorting data.frames?
mydf.ordered<-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing
= TRUE), ])
I was trying something like
Afunction<-function (mydf,colnames,decreasing=T){
mydf.ordered<-with(mydf, mydf[order(colnames, decreasing = decreasing),
])
}
but it didnt work
please
2002 May 03
2
merge (PR#1510)
Full_Name: Martin Elff
Version: 1.5.0
OS: MS Windows 98
Submission from: (NULL) (134.155.91.46)
Merging of two data frames by variables with different names
(using by.x and by.y) is no
longer possible (it was possible in version 1.4.1).
Call:
mvoteint.classd.matadd <- merge(
unique(mvoteint.classd),
unique(subset(dimens.mpp,
2004 Jun 07
1
Xtable giving an interesting problem
I'm using the current version of xtable for 1.9.0 and I have an
interesting error:
Error in match.names(clabs, names(xi)) : names don't match previous
names:
F value, Pr(>F)
In addition: Warning message:
longer object length
is not a multiple of shorter object length in: clabs == nmi
This is produced in the following manner:
>data.trans <-
2012 Aug 23
3
Concatenating data frames in R versus SAS
I am trying to concatenate 2 datasets that don't have exactly the same
column.
In SAS I did: data summary;
set agency prop;
run;
No problem
in R I get error message
summary <-rbind(agency,prop)
Error in match.names(clabs, names(xi)) :
names do not match previous names
But when I use rbin.fill, that overwrites the second file w/ first one.
Is there a way to replicate the sas process
2006 Apr 06
1
rbind
Hi list,
I have been trying to pileup dataframes with different column names using
rbind. I am getting the following error message. I was wondering if there is
a way to go around this minor problem?
Error in match.names(clabs, names(xi)) : names don't match previous names:
G
Thanks indeed for your information
Regards
Mahdi
--
-----------------------------------
Mahdi Osman (PhD)
2004 Apr 30
2
rbind with missing columns
Hello,
I have several data sets, which I want to combine column-by-column using
"rbind" (the data sets have ~100 columns). The problem is, that in some
data sets some of the columns are missing.
Simply using rbind gives me:
"Error in match.names(clabs, names(xi)) : names don't match previous
names"
Is there a simple way to make R do the rbind despite the missing columns
2007 Jan 12
0
Minor logical bug in rbind.data.frame ?
When attempting to merge 3 data frames, one of which has fewer columns
than the others, rbind.data.frame correctly refuses to perform the bind.
However, the error message given is a bit obscure due to a logical
bug in the match.names() internal function to rbind.data.frame.
Illustration:
## Three data frames with same column variable names:
> foo <- data.frame(v1 = c('a',
2006 Dec 02
0
fixup for debug package and R2.4.0
A number of users have spotted a terminal problem with the 'debug' package under R2.4.0, along the lines of
> mtrace(x)
> x()
Error in attr(value, "row.names") <- rlabs :
row names must be 'character' or 'integer', not 'double'
This arose from a bug in 'rbind.data.frame' in R2.4.0 itself. The bug is fixed in R2.4.0 patched, so the
2012 Jan 11
3
turning a list of vectors into a data.frame (as rows of the DF)?
As a newer R practicioner, it seems I stump myself weekly (at least) with issues that have spinning my wheels. Here is yet another... I'm trying to turn a list of numeric vectors (of uneual length) inot a dataframe. Each vector held in the list represents a row, and there are some rows of unequal length. I would like NAs as placeholders for "missing" data in the shorter vectors.
2010 Feb 01
1
problem withrbind function
Hi all,
I am trying to to merge two data.frames(kk and ff)
like
> kk
a b d
1 1 4 7
2 2 5 8
3 3 6 9
> ff
a b d
1 2 5 8
2 3 6 9
3 4 7 1
and
g<-rbind(kk,ff)
is working perfectly and giving results
but if any of the column name changed then its giving
"Error in match.names(clabs, names(xi)) :
names do not match previous names"
like
> kk
a b d
1 1 4 7
2 2 5 8
3 3
2023 Apr 09
1
extracting pdf tables...
Dear members,
I am extracting a pdf table by the following code:
> library(tabulizer)
> IDT <- extract_tables("https://www.canmoney.in/pdf/INTRADAYLEVERAGE-20220531-latest.pdf",output = "data.frame")
It returns 4 different data frames which I want to combine them and make one data frame. But when I run this:
>
2007 Aug 29
1
combining datasets by row
Rusers,
I am trying to append multiple .csv files of different dimensions (but
# of columns are the same for all .csv files). I do have .csv files
whose names are CA1.csv ~ CA100.csv. CA means california and 1 means
the first file. So what I have been doing (after googling how to append
by row multiple files) was:
cleanup_data<-function(state,count)
{
out<-matrix()
for (i in 1:
2023 Apr 09
1
extracting pdf tables...
Clearly the column names are different. You need to decide what to do about that. Choose the subset of dataframes where the column names are the same? Rename columns? Omit some columns? Add missing columns filled with NA?
On April 9, 2023 10:22:32 AM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote:
>Dear members,
> I am extracting a pdf table by the
2007 Jun 18
1
Problem with binding data-frames
Hello,
I'm having a problem concerning r-binding datasets.
I have six datasets, from six different plates, and two different days.
I want to combine these datasets together for analysis. Datasets from
day 2, have all the same columns than datasets from day 1. However in
addition, there are few columns more in day 2. Thus, using rbind for
this, results a error, because the objects are not the
2012 Jan 11
1
Constructing a data.frame from csv files
Dear R helpers,
Following is my R code where I am trying to calculate returns and then trying to create a data.frame. Since, I am not aware how many instruments I will be dealing so I have constructed a function. My R code is as follows -
library(plyr)
mydata <- data.frame(instru_name =
2023 Apr 09
1
extracting pdf tables...
Dear Jeff,
I want to rbind.
Thanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: R-help <r-help-bounces at r-project.org> on behalf of Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
Sent: Sunday, April 9, 2023 11:57 PM
To: r-help at r-project.org <r-help at r-project.org>
Subject: Re: [R] extracting pdf tables...
Sorry, did not