similar to: problem with not in in subseting dataframe

Displaying 20 results from an estimated 1000 matches similar to: "problem with not in in subseting dataframe"

1998 May 13
1
all.equal
I need the function all.equal which is in Splus but not yet in R. Below is a first cut. Comments would be appreciated. Paul Gilbert _______ all.equal <- function(obj1, obj2, ...) {if(mode(obj1) != mode(obj2) ) return("modes differ.") if(class(obj1) != class(obj2)) return("classes differ.") if(! all(unlist(attributes(obj1)) ==
2009 Jan 16
6
reading data from Excel Spread sheet
Hi all, I tried to read data from Excel spread sheet with using read.csv(file.choose()) and read.delim(file.choose()) but its showing " *ÐÏ.à.*." and also i tried with read.table(file.choose()) then its showing " * V1 1 ÐÏ\021ࡱ* " can any one suggest how to read data from Excel Spread sheet
2004 Jan 16
2
reference to objects
Hi, is there a way to reference to a data object without copying it? For example I have a huge matrix called dist and I want two objects obj1 and obj2 to have a memeber dist that points to the matrix, but I don't want, for memory reasons, to copy the matrix twice. As far as I understand the following code will generate three copies of my data: dist <- some_code_that_generates_data
2001 Oct 01
1
generic default values
I have a generic function test.equal <- function(obj1, obj2, ...) UseMethod("test.equal") however, the only argument that specific methods use is "fuzz" so I would like to change this to test.equal <- function(obj1, obj2, fuzz=???) UseMethod("test.equal") The problem is that some methods use slightly different default values for fuzz than others. How should
2011 Sep 07
1
access objects
hi, say I have consecutively numbered objects obj1, obj2, ... in my R workspace. I want to acces one of them inside a function, with the number given as an argument. Where can I find help on how to do that? Somebody must have been trying to do this before... Some keywords to start a search are appreciated as well. Here's an example, I hope it clarifies what I'm trying to do: obj1 <-
2008 Dec 23
1
.C and 'temporaries'
Hello, Before I get into troubles I ask here: I make a call to a C function using .C. What I would like to know is if the arguments in the .C call can also be 'temporary' objects. An example will illustrate this: # here we don't have a temporary Obj1 = 5 .C("Func", as.integer(Obj1 ), ...) # certainly works # here we do have a temporary Obj2 = 5 .C("Func",
2010 Mar 14
3
likelihood ratio test between glmer and glm
I am currently running a generalized linear mixed effect model using glmer and I want to estimate how much of the variance is explained by my random factor. summary(glmer(cbind(female,male)~date+(1|dam),family=binomial,data= liz3")) Generalized linear mixed model fit by the Laplace approximation Formula: cbind(female, male) ~ date + (1 | dam) Data: liz3 AIC BIC logLik deviance 241.3
2013 Sep 06
1
directives to explicitely exclude objects from import into namespaces
Hi, recently R CMD check --as-cran has noticed some more issues with package namespace imports with the recommended remedy to use importFrom() and friends. In my case, there was only a conflict restricted to some few imports, while I would prefer to still import all the non-conflicting objects, methods, and classes of the respective package namespace. So would it be possible to have some new
2011 Oct 05
6
reporting multiple objects out of a function
Dear folks, I?m trying to build a function to create and make available some variables I frequently use for testing purposes. Suppose I have a function that takes some inputs and creates (internally) several named objects. Say, fun1 <- function(x, y, z) {obj1 <- x; obj2 <- y; obj3 <- z <missing stuff> } Here is the challenge: After I run it, I want the objects to be
2010 Jun 22
3
Problem with writing a CSV file in UTF-8 formate
Hi all, I have a problem with writing a *.CSV file in UTF-8 formate I tried to write a dataframe named "dfPREINDX" to the new file named "preindx.csv" in below formate write.table(dfPREINDX,PreIndex,fileEncoding="UTF-8",sep="|",row.names=FALSE) but its throed an error like Error in write.table(dfPREINDX, "preindx.csv", fileEncoding =
2005 Jul 04
3
How difficult is it to wrap a large C++ library with R?
Dear list, I have developed a forward-time population genetics simulation environment simuPOP, which is a set of C++ (template) classes/functions wrapped by SWIG as Python libraries. R is used extensively as plotting and statistical analysis engine through RPy package. I use Python to wrap simuPOP since most the following can be easily done using SWIG or Python C API. However, since Python is
2005 May 07
1
Test on mu with multivariate normal distribution
Dear WizaRds, I am sorry to bother you with a newbie question, but although I tried to solve my problem using the various .pdf files (Introduction, help pages etc.), I have come to a complete stop. Please be so kind as to guide me a little bit along my way of exploring multivariate analysis in R. I want to test wether the means-vector mu1 of X, consisting of the means per column of that matrix
2001 Apr 09
4
fastest R platform
Hello, everyone! I picked up R several months ago and have adopted it as my choice for statistical programming. Coming from a Java background, I can honestly say that R is not only free, it is better tha S-plus: the lexical scope in R makes it very simple to simulate Java's object model. For this, I encourage everyone to read the artcle: Robert Gentleman and Ross Ihaka (2000) "Lexical
2009 Feb 02
2
parsing problem
Hi all, I am trying to parse a vector for caliculating minimum in that vector the vector having values like 1 Kontrolle 2 Placebo 3 125mg/kg 4 250mg/kg 5 500mg/kg 6 1000mg/kg hear i tries for comverting it into numeric with using "as.numaric()" function but i got values like 5 6 2 3 4 1 it gives 1000mg/kg is the least one but i have
2009 Jun 08
2
problem with bulk insert into a *.csv file
Hi all, I am trying to create a "index.csv" with caliculating different types of caliculations . In that i have to caliculate on 10,000 studies and have to insert many no of rows more than 500,000 for that right now I am inserting every row after caliculating and doing data.frame but its taking much time to create that index.csv is there any thing like bulk insert in to file
2010 Mar 09
2
Problem with mean
Hi all, I got one intresting problem with caliculating mean that is while i am taking mean of values *0.6, -0.8, 4, -3.8* using *val<-c(0.6, -0.8, 4, -3.8)* *mean(val)* it given result as *2.775558e-17* but the actual result is *"0"* can any one suggest how can I get correct mean result in this case can any one suggest how I can farward thanks in regards kiran [[alternative
2009 Dec 17
2
Problem with spliting a dataframe values
Hi all, Hi this is kiran I am facing a problem to split a dataframe that is.. i have a string like: "a,b,c|1,2,3|4,5,6|7,8,8" first I have to split with respect to "|" I did it with command unlist(strsplit("a,b,c|1,2,3|4,5,6|7,8,8", "\\,")) after getting that set i made it as a dataframe and it comes like a,b,c 1,2,3 4,5,6 7,8,8 now i have to
2018 Feb 26
2
lld: order of object files to be put into executable
Hi all! Is it possible somehow to specify *order* of object files to be put to executable file? For example, I want to put obj1.o and obj2.o somewhere at the beginning, so when executable file would be mapped to memory, this code would be accessed quickly.
2020 Jun 19
2
Aliasing and forwarding optimization
----Snip-- struct st1{ int a; }; struct st2{ int b; }; struct st { struct st1 obj1; struct st2 obj2; }Obj; int test1(struct st1 * ptr1 , struct st2 * ptr2, struct st2 *ptr3) { ptr1->a = 10; *ptr3 = *ptr2; return ptr1->a; } --Snip--- For the above case GCC is able to store forward the value 10 to the return place. LLVM is not doing this. GCC https://godbolt.org/z/FCjCXy LLVM
2010 Apr 20
2
problem with retreaving column from a data.frame
Hi all, I have a problem with retreaving column from a data.frame that is I have a data.frame named "temp" in that dataframe some column are there whose names are "IDENTIFIER" "UNIQUEID" "TRIALGROUPSID" "GRPNUMBER" "GRPDESC" "SEXDID" "STDID" "STUDYTYPE" "SDID"