Displaying 20 results from an estimated 7000 matches similar to: "A question about logical controls and function arguements"
2008 Apr 30
2
Empty Set In a Set
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Dear List:
I'm looking for a form of the empty set such that if ES is said
representation,
~ ES %in% c(1,2,3)
evaluates to TRUE.
Thank you in advance for your assistance.
Sincerely,
Jason Q. McClintic
- --
Jason Q McClintic
UST MB 1945
2115 Summit Avenue
St. Paul, MN 55105
jqmcclintic at stthomas.edu
mccl0219 at tc.umn.edu
"It is
2007 Jun 19
1
A question about plots and lists in functions
R-helpers:
I tried googling and couldn't find anything.
I have a function I am sourcing into R that does some calculations to
generate a simulated dataset. I currently have a a list set up to store
the outputs from the function and a plot of one of them (a set of
ordered pairs) like this:
foo<-function(x,y,z){
## do some work here ##
list(x=x,y=y,z=z,output1=output1,output2=output2,
2008 Mar 25
1
Passing (Optional) Arguments
Dear List:
In short, I am writing a number of functions as building blocks for
other functions and have some questions about scoping and passing arguments.
Suppose I have functions foo1, foo2, and foo3 such that:
foo1<-function(a=1,b=TRUE,c=FALSE){#do stuff};
foo2<-function(x=1,y=FALSE,z=c(1,2,3,4)){#do stuff};
foo3<-function(lambda,...){lambda*foo1()*foo2()};
I want to be able to
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
Try changing your method to "ML" and try again. I tried the run the
first example from the documentation and it failed with the same error.
Changing the estimation method to ML worked.
@List: Can anyone else verify the error I got? I literally ran the
following two lines interactively from the example for goodfit:
dummy <- rnbinom(200, size = 1.5, prob = 0.8)
gf <- goodfit(dummy,
2008 Feb 26
1
GLM
Hello,
I am trying to perform a glm analysis on a 68x13113 matrix (named
data.spect). The first column corresponds to the predictor
(data.spect[,1]) and the rest to the response variables
(data.spect[,2:13113]). When I try this code
glmObject <- glm(data.spect[,2:13113]~data.spect[,1])
I get the following error:
Error: (subscript) logical subscript too long
Could anyone help me on
2013 Sep 01
1
Intersect 2 lists+bring extra columns
Hi everyone,
I am pretty new to R, so be patient.
I am trying to intersect 2 columns and in the rows that intersect, I want
information from the 3rd column to be brought with it. I think it will be
easier to explain with an example example.csv
<http://r.789695.n4.nabble.com/file/n4675136/example.csv> .
In my example, I have a reference list of fruit (first column), and my fruit
of
2011 Jul 06
3
finding the intersection of two vectors
Hi,
Suppose I have two vectors, not necessarily the same length (in fact,
they usually are different lengths): y.1 that has increasing values
between 0 and 1; y.2 that has decreasing values between 1.0 and 0. You
can picture these as being supply (= y.1) and demand (= y.2) curves from
economics. I typically plot these vectors on the same graph against a
common x variable, which happens to
2008 Feb 20
2
intersecting rows of a matrix
useR's,
First, I would like to say thanks to John Fox for providing this segment of
code to perform intersection for multiple sets:
intersection <- function(x, y, ...){
if (missing(...)) intersect(x, y)
else intersect(x, intersection(y, ...))
}
I want to execute this function on the rows of a matrix I have:
Ik.mat.test <- matrix(c(2,3,6,1,2,6,6,1,2),byrow=T,nrow=3)
> Ik.mat.test
2005 May 05
2
Intersection of more than two groups in one function?
Hi all,
As far as I can tell, the only canned way to do an intersect between two
vectors of ints is the intersect(vec1, vec2) function -- is there another
function I'm missing for intersecting more than two vectors??
TIA,
Ken
2004 Jul 08
4
read.frame
Hello group,
I am learning R and I am new to many concepts.I face
the following errors when I am trying to execute the
following. I have 4 text files with protein accession
numbers. I wanted to represent them in a venn diagram
and for that I using intersect and setdiff functions.
My data looks like this:
file1.txt (c):
NP_000005
NP_000020
NP_000030
NP_000053
file2.txt(e):
NP_000005
NP_000020
2012 Feb 02
3
How to get intersection of multiple vectors?
v1<-c("a","b","c","d")
v2<-c("a","b","e")
v3<-c("a","f","g")
I want to get the intersection of v1,v2,v3,ie "a"
How can I do then?
What I know is only for 2 vectors via "intersect" function,but don't know how to deal with multiple vectors.
Many thanks
2011 Oct 25
1
question regarding intersect function
Hi
I have probably a very simple question but I'm going crazy trying to find
the solution.
I have two data.frames with headers and I'm doing an intersection between
them by names, such that the intersected data.frames are returned by:
df1[intersect(names (df1), names(df2))] and the same for df2
Now, I want to have all the opposite data that did not intersect. I tried to
do:
2012 Jun 06
3
problem about set operation and computation after split
hi,
I met some problems in R, plz help me.
1. How to do a intersect operation among several groups in one list, without
a loop statement? (I think It may be a list)
create data:
myData <- data.frame(product = c(1,2,3,1,2,3,1,2,2),
year=c(2009,2009,2009,2010,2010,2010,2011,2011,2011),value=c(1104,608,606,1504,508,1312,900,1100,800))
mySplit<- split(myData,myData$year)
2008 May 28
1
Multiple Intersections
Hi all,
I don't know if this is the correct venue for this question, but I am sure
that someone will correct me if I am in the wrong list.
I have been searching throughout R for a function that can find the
intersection of multiple sets of "things". Say for instance, I have a list
of $n$ character vectors and would like to find the intersection of all $k$
subsets. I don't
2010 May 20
1
intersect() without discarding duplicates?
Hi all,
The ?intersect entry kindly points out that it discards duplicate
entries. I'm looking, however, to get the intersection while KEEPING
duplicate entries, and there are no instructions on how to accomplish this
using intersect().
Does anybody have any idea how this might be done, or am I going to need to
program something from scratch (something like ordering the vectors and then
2008 Jun 15
1
wine instalation
I install with Wine ProgeCad from Progesoft , that I have been using for many years in Microsoft Windows, and everithing is runing as I will spect, with the exception that I recive this following mesage:
?failed to load control 'ComandButton' from FM20.DLL. Your version of FM20.DLL may be outdated. Make sure you are using the version of the control that was provided with your
2015 Dec 23
0
疯狂再袭 12.12 花花公子真皮皮衣 每个男人都应该拥有它
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600">
<tbody>
<tr>
<td align="center" style="font-size:12px; line-height:30px;">
如果您无法阅读此邮件,请<a
2005 Sep 21
3
ts.intersect bug?
This code gives an error:
a <- ts(1:10, start=0, freq=10)
b <- ts(1:10, start=1, freq=10)
ts.intersect(a,b)
This one works normally (and correctly):
a <- ts(1:10, start=0)
b <- ts(1:10, start=1)
ts.intersect(a,b)
Antonio, Fabio Di Narzo.
P.S. How to switch off italian error messages to post on r-help?
> version
_
platform i386-pc-mingw32
arch i386
os
2011 Feb 22
2
How to find points of intersection between harmonic function and a line
Hi,
Sorry for the very short explanation about the problem of intersection.
I have a wave function monitored from the heart beat in a particular interval of
times.?Apart?fom that, there is?a line with positive slope (e.g: y = x+2) which
lies across the wave and intersect on a number of points. My problem is i have
no exact equation for?such a?complex harmonic wave produced by the heart
2013 Mar 12
1
Testing for significance of overlap in three sets - mantelhaen test?
Hi,
My apologies for the naive question!
I have three overlapping sets and I want to find the probability of finding
a larger/greater intersection for 'A intersect B intersect C' (in the
example below, I want to find the probability of finding more than 135
elements that are common in sets A, B & C). For a two set problem, I guess
I would do a Fisher or chi-square test. Here is what