similar to: retain class after merge

Displaying 20 results from an estimated 2000 matches similar to: "retain class after merge"

2012 Nov 02
2
Merge data frame with mispelling characters
Hello dear R-helpers, I'm working with R-2.15.2 on Windows 7 OS. I'm stucked with a merge of two data frames by characters. In each data frame I got two different list of names, that is my main-key to be merged. To figure out what I'm saying, I build up a modified "?merge" example, with errors by purpose: # Data for authors: authors <- data.frame( surname =
2004 May 13
0
using trace() on S4 coerce method
I'm trying to use trace() on an S4 coerce method, but get the error Error in bindingIsLocked(what, whereM) : no binding for "coerce" What am I doing wrong? Example code follows. (I've googled the R mailing lists for "trace coerce" and "trace bindingisLocked" without finding anything relevant. Perhaps I should re-define the method in terms of an
2008 Aug 20
1
acts_as_ferret and DRb server errors
I am seeing this in my ferret_server.log when I do a search: DRb server: ensure_index_exists for class Myclass1 DRb server: ensure_index_exists for class Myclass2 DRb server: ensure_index_exists for class Myclass3 DRb server: ensure_index_exists for class Myclass4 #method_missing(:id_multi_search, ["Myclass1", "test*", ["Myclass4", "Myclass3",
2009 Apr 08
2
factor, as.factor and levels
Dear All, to my surprise as.factor does not accept a levels argument. Maybe I did not read the documentation well enough. See the example below. I wanted to use ch1 as factor in the newdata argument of survfit, so I assumed that I could write as.factor(ch1, levels=ch1), since the order should be kept. But as.factor(ch1, levels=ch1) results in the error: Error in as.factor(ch1, levels = ch1)
2010 Dec 31
3
survexp - example produces error
Dear All, reposting, because I did not find a solution, maybe someone could check the example below. It's taken from the help page of survdiff. Executing it, gives the error "Error in floor(temp) : Non-numeric argument to mathematical function" best regards, Heinz library(survival) ## Example from help page of survdiff ## Expected survival for heart transplant patients based
2009 Jul 13
1
survSplit with data.frame containing a Surv object
Dear All, since years I am struggling with Surv objects in data.frames. The following seems to have to do with it. See below the modified example from the help page of survSplit. The original works, as expected. If, however, a Surv object is added to the data.frame, each record gets doubled. Is there some solution other than avoiding Surv objects in data.frames? Thanks, Heinz
2006 Sep 23
2
Question about merge()
If I want to do a join based on *two* matching fields in two data frames, can merge() handle this? It appears to only handle a single matching column -- do I need to make a "metacolumn" or is there some way to do this? E.g.: Dataframe 1 contains columns A,B,C and Dataframe 2 contains A,B,D I want an output A,B,C,D which places C and D together if A and B match (otherwise, make two
2010 Oct 25
0
Possible bug with scrambled messages on Win7-64bit using R2.12.0 (32/64 bit version)
When executing 'dyn.load("this/dll/does/not/exist.dll")' the resulting error message is scrambled. Not all characters will be displayed and when I select the empty region text disappears/reappears. For a screenshot see: http://dl.dropbox.com/u/2602516/dyn.load_error1.PNG and http://dl.dropbox.com/u/2602516/dyn.load_error2.PNG. Note: I had the same problem with xlsReadWrite
2012 Nov 30
1
CreateThread failure since R 2.15.2 (32-bit)
Dear R users & developers, I coming across the following issue since R 2.15.2 32-bit (running on Windows XP 32.bit; some output left out for conciseness): > setInternet2(TRUE) > require(rJava) > .jinit() > getCRANmirrors() > system("ls" , intern = TRUE) Error in system("ls", intern = TRUE) : CreateThread failed My details are as follows: >
2015 Jan 22
1
R CMD check: Locale not set to C?
Dear All The "R CMD check" on the "zoo" (1.7-11) package results in an error on my environment. It can be reduced to the following example: ---------------------------------------------------- > require(zoo) > read.zoo(system.file("doc", "demo1.txt", package = "zoo"), sep = "|", format="%d %b %Y") Error in
2013 Nov 06
0
MPICH2 Rmpi and doSNOW
Hi I have managed to install MPICH2 and Rmpi on my Windows 7 machine. I can also run the following code > library(Rmpi) > mpi.spawn.Rslaves() 4 slaves are spawned successfully. 0 failed. master (rank 0, comm 1) of size 5 is running on: MyMaster slave1 (rank 1, comm 1) of size 5 is running on: MyMaster slave2 (rank 2, comm 1) of size 5 is running on: MyMaster slave3
2010 Dec 20
0
survexp - unable to reproduce example
Dear All, when I try to reproduce an example of survexp, taken from the help page of survdiff, I receive the error message "Error in floor(temp) : Non-numeric argument to mathematical function" . It seems to come from match.ratetable. I think, it has to do with character variables in a ratetable. I would be interested to know, if it works for others. With an older version of
2008 Jun 27
0
unexpected lining up of labels in axis(4, hadj=1) (PR#11840)
Please explain (I am quoting the FAQ) how you 'are sure you know for certain what it ought to have done'. Please quote and give exact references to the documentation that led you to expect what you expected (but did not actually describe). I would have expected it to work as documented using the default value mgp=c(3,1,0), and that is what I see when I run the example. As far as I
2008 Sep 16
1
aggregate() does not return POSIXct object correctly (PR#12887)
Full_Name: Rene Locher Version: 2.7.2 Patched (2008-09-12 r46541) OS: XP Submission from: (NULL) (160.85.231.40) dat <- data.frame(event=factor(c("A","A","B")), time=as.POSIXct(c("2008-01-10","2008-01-01","2008-01-04"))) min(dat$time) ## "2008-01-01 CET" ## as expected
2016 Dec 22
0
Unexpected I(NULL) output
>>>>> Florent Angly <florent.angly at gmail.com> >>>>> on Tue, 20 Dec 2016 13:42:37 +0100 writes: > Hi all, > I believe there is an issue with passing NULL to the function I(). > class(NULL) # "NULL" (as expected) > print(NULL) # NULL (as expected) > is.null(NULL) # TRUE (as expected) > According
2017 Jan 26
0
Undefined behavior of head() and tail() with n = 0
>>>>> Florent Angly <florent.angly at gmail.com> >>>>> on Wed, 25 Jan 2017 16:31:45 +0100 writes: > Hi all, > The documentation for head() and tail() describes the behavior of > these generic functions when n is strictly positive (n > 0) and > strictly negative (n < 0). How these functions work when given a zero >
2016 Dec 20
3
Unexpected I(NULL) output
Hi all, I believe there is an issue with passing NULL to the function I(). class(NULL) # "NULL" (as expected) print(NULL) # NULL (as expected) is.null(NULL) # TRUE (as expected) According to the documentation I() should return a copy of its input with class "AsIs" preprended: class(I(NULL)) # "AsIs" (as expected) print(I(NULL)) # list() (not expected!
2006 Oct 06
2
factor levels with umlauts
Hi all I have to generate some test data for import in an sql database. The database is meant for web-based data entry in a study taking place in a german speaking region, so factor levels of the variables include umlauts. The variables in the dataframe t.muster are generated e.g. like this: t.muster$screening <- rep("ausgef?llt",50) and exported to a .csv file by:
2016 Dec 20
2
Very small numbers in hexadecimal notation parsed as zero
Hi all, I have noticed incorrect parsing of very small hexadecimal numbers like "0x1.00000000d0000p-987". Such a hexadecimal representation can can be produced by sprintf() using the %a flag. The return value is incorrectly reported as 0 when coercing these numbers to double using as.double()/as.numeric(), as illustrated in the three examples below:
2017 Jan 25
3
Undefined behavior of head() and tail() with n = 0
Hi all, The documentation for head() and tail() describes the behavior of these generic functions when n is strictly positive (n > 0) and strictly negative (n < 0). How these functions work when given a zero value is not defined. Both GNU command-line utilities head and tail behave differently with +0 and -0: http://man7.org/linux/man-pages/man1/head.1.html