similar to: rbind-ing with empty data frame produces error

Displaying 20 results from an estimated 120 matches similar to: "rbind-ing with empty data frame produces error"

2019 May 26
2
rbind has confusing result for custom sub-class (possible bug?)
On Sun, May 26, 2019 at 4:06 AM Michael Chirico <michaelchirico4 at gmail.com> wrote: > > Have finally managed to come up with a fix after checking out sys.calls() > from within the as.Date.IDate debugger, which shows something like: > > [[1]] rbind(DF, DF) > [[2]] rbind(deparse.level, ...) > [[3]] `[<-`(`*tmp*`, ri, value = 18042L) > [[4]] `[<-.Date`(`*tmp*`,
2019 May 27
2
rbind has confusing result for custom sub-class (possible bug?)
Yes, thanks for following up on thread here. And thanks again for clearing things up, your email was a finger snap of clarity on the whole issue. I'll add that actually it was data.table's code at fault on the storage conversion -- note that if you use an arbitrary sub-class 'foo' with no methods defined, it'll stay integer. That's because [<- calls as.Date and then
2019 Jun 02
1
rbind has confusing result for custom sub-class (possible bug?)
I thought it would be good to summarize my thoughts, since I made a few hypotheses that turned out to be false. This isn't a bug in base R, in either rbind() or `[<-.Date`. To summarize the root cause: base::rbind.data.frame() calls `[<-` for each column of the data.frame, and there is no `[<-.IDate` method to ensure the replacement value is converted to integer. And, in fact,
2019 May 26
2
rbind has confusing result for custom sub-class (possible bug?)
Debugging this issue: https://github.com/Rdatatable/data.table/issues/2008 We have custom class 'IDate' which inherits from 'Date' (it just forces integer storage for efficiency, hence, I). The concatenation done by rbind, however, breaks this and returns a double: library(data.table) DF = data.frame(date = as.IDate(Sys.Date())) storage.mode(rbind(DF, DF)$date) # [1]
2010 Mar 26
2
R loop help
Hi, I am tring to write a loop to compute this, ========================== x1=c( rep(-1,4), rep(1,4) ) x2=c( rep(c(-1,-1,1,1),2) ) x3=c( rep(c(-1,1),4) ) x1*x2 x1*x3 x2*x3 ======================== suppose i have x1,x2,x3 i want to compute their ' two factor interactions', x1x2,x1x3 and x2x3, I wrote ======================== for(i in 1:2){ for( j in i+1:3){ xij=c()
2010 Aug 05
1
rbind on data.frame that contains a column that is also a data.frame
Hi, The following was already a topic on r-help, but after understanding what is going on, I think it fits better in r-devel. The problem is this: When a data.frame has another data.frame in it, rbind doesn't work well. Here is an example: -- > a=data.frame(x=1:10,y=1:10) > b=data.frame(z=1:10) > b$a=a > b z a.x a.y 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5
2012 Aug 02
1
finding the MLEs of IG parameters by EM-Alorithm
Dear all I'm trying to caculate the MLEs for parameters of Inverse Gaussian distribution (in a k-sample problem with common mean) by using EM-Algorithm. I found some package for EM-Algorithm that are useful for missing or incomplete data and are not helpful for solving my problem. (Exactly, the problem is: Let Xij, i=1,..,k , j=1,...,ni, be a random sample from IG(?,?i). So the
2017 Jan 17
2
bug in rbind?
I suspect there may be a bug in base::rbind.data.frame Below there is minimal example of the problem: m <- matrix (1:12, 3) dfm <- data.frame (c = 1 : 3, m = I (m)) str (dfm) m.names <- m rownames (m.names) <- letters [1:3] dfm.names <- data.frame (c = 1 : 3, m = I (m.names)) str (dfm.names) rbind (m, m.names) rbind (m.names, m) rbind (dfm, dfm.names) #not working rbind
2006 Oct 17
1
About compositional data analysis
The compositional data xi=(x_i1,x_i2,...,x_in), for each fixed i , xij>0, and sum(xij)=1; I want to compare the mean( u_i) of several groups i.e. H0: u_1=u_2=...=u_N or H0: u_11=u_21=...=u_N1 Are there any ANOVA tpye tools to do this work in R? Thanks, WEN S Q [[alternative HTML version deleted]]
2020 Oct 09
1
Aide pour finaliser ce code
Hello. Here is my R code. I used the functional data . Now I need to use the functional data by applying the kernels instead of the xi, yi functions. Bonjour. Voici mon code en R . J'ai utiliser les donn?es fonctionnelles . Maintenant j'ai besoin d'utiliser les donn?es fonctionnelles en appliquant les noyaux ? la place des fontions xi, yi library(MASS)
2020 Oct 13
1
Please need help to finalize my code
Hm. Google tells me that kernel function is in stats package which comes with base installation and is invoked when you start R. search() [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads"
2020 Oct 10
3
Please need help to finalize my code
Good evening dear administrators, It is with pleasure that I am writing to you to ask for help to finalize my R programming algorithm. Indeed, I attach this note to my code which deals with a case of independence test statistic . My request is to introduce the kernels using the functional data for this same code that I am sending you. So I list the lines for which we need to introduce the
2009 Mar 13
1
Hierarchical Bayesian Modeling in R
Hi Friends, I'm trying to model the consumer decisions (Click-Through Rate and Conversion) in Search Engine Advertising using a hierarchical Bayesian binary logit. The input data is the weekly CTRs and Avg. Position for each search keyword. CTR is modeled as (for each keyword i and week j): Pij = exp(C + Bi x Positionij + A1 x Lengthi + A2 x Brandi + A3 x ProductSpecifici) / [1 + exp(C +
2020 Oct 13
0
Please need help to finalize my code
What do you *mean* "when you want to use the kernels". WHICH kernels? Use to do WHAT? In your browser, visit cran.r-project.org then select "Packages" from the list on the left. Then pick the alphabetic list. Now search for 'kernel'. You will find dozens of matches. On Wed, 14 Oct 2020 at 05:15, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hm. Google tells
2007 Nov 22
1
distance matrix to coordinate format for spatial stats
Greetings, I would like to use some of the spatial statistics functions in R, but I am having trouble entering data. My data is already in a distance matrix format, not an X Y coordinate format (each Xij cell in the matrix represens the distance from point i to j). Does anyone know of a way to convert a distance matrix to a ppp object in spatstat, or an X,Y coordinate system for other
2000 Jul 11
1
MANOVA
Hi I need to compare the performance of two sludge inertization methods. For that i want make a manova Wilks test. Description of the experiment: After the calcination at different temperatures my calcinated sludge are submeted to the lixiviation test. In my tables i show the concentration of the some elements in the extract phase. The results: Method A (calcination at 1100 C) Chromium
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
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',
2019 May 27
0
rbind has confusing result for custom sub-class (possible bug?)
On Sun, May 26, 2019 at 6:47 AM Joshua Ulrich <josh.m.ulrich at gmail.com> wrote: > > On Sun, May 26, 2019 at 4:06 AM Michael Chirico > <michaelchirico4 at gmail.com> wrote: > > > > Have finally managed to come up with a fix after checking out sys.calls() > > from within the as.Date.IDate debugger, which shows something like: > > > > [[1]]
2019 May 27
0
rbind has confusing result for custom sub-class (possible bug?)
Follow-up (inline) on my comment about a potential issue in `[<-.Date`. On Mon, May 27, 2019 at 9:31 AM Michael Chirico <michaelchirico4 at gmail.com> wrote: > > Yes, thanks for following up on thread here. And thanks again for clearing things up, your email was a finger snap of clarity on the whole issue. > > I'll add that actually it was data.table's code at fault