Hi:
Here's one approach using the reshape() function in base R:
# Read in your data:
d - read.table(textConnection(
Candidate.IDSpecialty Office Score
110002 C London 47
110002 C East 48
OK, I save/load history. This option is under File
On Aug 4, 2:54 pm, R. Michael Weylandt michael.weyla...@gmail.com
wrote:
Check out ?savehistory in utils.
Also, I think most GUI's do this - I can certainly attest that RStudio does
Michael Weylandt
On Thu, Aug 4, 2011 at 11:55 AM,
Unfortunately I found myself in the same position as outlined above, where I
was requested to reproduce 'standardized regression coefficients' as
reported by SPSS. Below an example that produces something very similar to
the results table from an SPSS Linear Regression procedure, including the
Hi,
I am a new user to R.
I am having the following problem while using R:
The defined function is having following a$unit as input but if I define
a$unit1 then still I am getting the output which is not desired.
__
*Function:*
testfunction-function(a){
You can with the routines in the memisc library. You can open a file
using spss.system.file and then import a subset using subset. Look in
the help pages of spss.system.file for examples.
HTH
Jan
On 09/25/2011 11:56 PM, sassorauk wrote:
Is it possible to import only certain variables from
The $ operator does partial matching by default so for example
print(b$u)
[1] 1
The [[ operator does not
print(b[[unit]])
NULL
print(b[[unit1]])
[1] 1
See help($) for more details and also the warnPartialMatch* arguments
in help(options).
Try
testfunction - function(x) if (exists(unit,
Hi everyone,
Im working with a panel of firm/years observations. My panel not only is
unbalanced but also have some gaps in years.
For example, firm 1 has 1999, 2000, 2001, 2004, 2005, firm 2 has 2000, 2001,
2003, 2005, and so on.
Im using the plm package and what Im asking is how can I
B77S bps0002 at auburn.edu writes:
I have never used that function, but I know that with read.csv() you can do
the following to select only the columns you want:
chosen_vars - read.csv(Workbook1.csv, header=T)[c(variable1,
variable3)]
This is not actually selectively importing: it's
Hello. I've been trying to change the colour of the bars in the auto.key to
blue and red. I have tried:
barchart(Rate~Digit,Ben,groups=Cat, horizontal=FALSE,ylab=Rate
(%),auto.key=list(points=FALSE,rectangles=TRUE,space=right),col =
c(blue, red),main=Benford's rate vs combined \n sample rate Lab
Hej,
Thanks for the idea. I will try and see if I can make progress.
+ I appologise for the shortcut explanations. I'll dedicate myself to
greater accuracy in future.
tkd
--
View this message in context:
http://r.789695.n4.nabble.com/spatstat-owin-image-tp3837023p3843284.html
Sent from the R
Dear all,
I am a new member to the list - and to the analysis that I am attempting.
I have the following case
A group of us have been monitoring (over a period of a few years) a number
of paired plots that were flooded and / or burnt.
The plots are located in two topographical settings, some
Hello all,
Thanks for your answers! I'll give your suggestions a try later on today.
Cheers,
Léa
--
View this message in context:
http://r.789695.n4.nabble.com/Trouble-creating-and-adjacency-matrix-tp3842106p3843660.html
Sent from the R help mailing list archive at Nabble.com.
It is true that our lives are complex but we have to stick to principles.
Plus, statisticians have the lowest unemployment rate in all of the sciences
(1% according to NSF from a poll taken 2 years ago) so we should be able to
capitalize on that by sticking to well-founded beliefs and facts and
On 09/23/2011 03:00 PM, PtitBleu wrote:
Hello,
I would like to know if it exists a package including something equivalent
to this page:
http://www.developpez.net/forums/d740403/autres-langages/algorithmes/contribuez/image-geometrie-projective-homography/
Hi,
The function 'dgev' in the 'fExtremes' package contains a 'log'
argument, for returning the log of the gev density. For example:
library(fExtremes)
x = seq(100,1000)
density_values_log = dgev(x, 0.21, 455, 150, log=TRUE)
density_values_nolog = dgev(x, 0.21, 455, 150, log=FALSE)
However,
People,
It appears that there is no way of getting Boxplots to plot using Mean,
SD, Max Min - is there something else that would do what I want? I
couldn't find it . .
Thanks,
Phil.
--
Philip Rhoades
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: p...@pricom.com.au
Dear Phil,
Have a look at the ggplot2 package.
library(ggplot2)
#classic boxplot
ggplot(mtcars, aes(x = factor(cyl), y = mpg)) + geom_boxplot()
#custom boxplot
myboxplot - cast(cyl ~ ., value = mpg, data = mtcars, fun = c(min, max, sd,
mean))
ggplot(myboxplot, aes(x = factor(cyl))) +
Thanks for your responses.
Ben is right that I am looking for a way to import a subset of data from
SPSS into R. If I could do this it would mean not having to save large
datasets which takes a long time and would mean duplicating a lot of the
same information each time. I find SPSS slow to
Hi,
In addition to GADA, what are the available package in R and bioconductor to
analyze amplification, deletion, LOH and indels of CNV, SNP data? Any reference
is welcome.
Best,
Carol
__
R-help@r-project.org mailing list
Hi group,
This is how my test file looks like:
Chr start end sample1 sample2
chr2 9896633 9896683 0 0
chr2 9896639 9896690 0 0
chr2 14314039 14314098 0 -0.35
chr2 14404467 14404502 0 -0.35
chr2 14421718 14421777 -0.43 -0.35
chr2 16031710 16031769 -0.43 -0.35
chr2 16036178 16036237 -0.43
On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades p...@pricom.com.au wrote:
People,
It appears that there is no way of getting Boxplots to plot using Mean, SD,
Max Min - is there something else that would do what I want? I couldn't
find it . .
Try replacing the stats component of boxplot's
I'm trying to find 50 portfolios on the efficient frontier using the
Black-Litterman model but have not found a suitable method for doing so. I
tried using the portfoliosFrontier function given in the package
fPortfolio using the optimalPortfolios.fPort function on package BLCOP
but does not
On Sep 26, 2011, at 10:30 AM, carol white wrote:
Hi,
In addition to GADA, what are the available package in R and
bioconductor to analyze amplification, deletion, LOH and indels of
CNV, SNP data? Any reference is welcome.
Cross-posting is deprecated in the R mailing list. Please read the
Dear R users,
I am thinking about an easy and especially fast solution to calculate the
x,y coordinates of the interesection between the borders of the red circle
and the line.
short example:
plot(c(-3,0,3,9,21),c(-8,0,5,12,25))
draw.circle(0,0,radius=6,border=red,col=NA,lty=1,lwd=1)
x -
If you draw the whiskers out to the extrema of the data
you may wish to omit the outliers, which are encoded
by the out and group components of boxplot's return value:
d - split(Nile, factor(time(Nile)1902, labels=c(pre-dam, post-dam)))
par(mfrow=c(1,2))
b - boxplot(d, main=Default Boxplot)
Hi, somebody knows about one R-package which i can evaluate quality
(recall, precision, accuracy, etc) of Neural network classification
with more than 2 classes. I found ROCT package,
http://cran.r-project.org/web/packages/ROCR/index.html, but it only
workes with binary classifications,
Best
You might get a more satisfactory answer from the R-SIG-Finance list, but
more immediately, can you say what was unsatsifactory about the results the
two mentioned packages? Specifically, minimal working example with data etc.
Michael
On Mon, Sep 26, 2011 at 10:32 AM, jaosma
Thanks for the insight, Ben. I can appreciate not wanting the hassle
of administration, and I suppose there are already sufficient funds
for the fixed costs of stuff like the website.
I like the idea of an intermediary that would handle all the issues
related to donations, non-profit, etc. Then
On Sep 26, 2011, at 11:03 AM, Chris82 wrote:
Dear R users,
I am thinking about an easy and especially fast solution to
calculate the
x,y coordinates of the interesection between the borders of the red
circle
and the line.
This would seem to be the solution to two simultaneous equations
Gabor,
On 2011-09-27 00:35, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades p...@pricom.com.au
wrote:
People,
It appears that there is no way of getting Boxplots to plot using
Mean, SD,
Max Min - is there something else that would do what I want? I
couldn't
Hello everyone,
Apologies in advance, as this is partially a stats question and partially an R
question. I have been using a GAM to model the activity level of bats going
into and coming out from a forested edge. I had eight microphones set up in a
line transect at each of eight sites, and
You can also eliminate the outliers from boxplots with the outline=F
parameter.
--Kelly V.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of William Dunlap
Sent: Monday, September 26, 2011 8:12 AM
To: p...@pricom.com.au
Cc:
On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades p...@pricom.com.au wrote:
Gabor,
On 2011-09-27 00:35, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades p...@pricom.com.au
wrote:
People,
It appears that there is no way of getting Boxplots to plot using Mean,
SD,
Gabor, Bill,
On 2011-09-27 02:51, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades p...@pricom.com.au
wrote:
Gabor,
On 2011-09-27 00:35, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades
p...@pricom.com.au
wrote:
People,
It appears
There are criteria to tell if differences are meaningless, but they come from
the science and the researcher, not from statistics tests and algorithms.
Consider the question: Is one second of difference important? to answer that
needs a bunch of context. One second can be a large period of
Dear Phil,
An alternative solution is to draw a regular Tukey Box Plot but
overlay the means +/- 1 sd:
boxplot(anscombe)
psych:::error.bars(anscombe,sd=TRUE,add=TRUE)
Bill
At 3:45 AM +1000 9/27/11, Philip Rhoades wrote:
Gabor, Bill,
On 2011-09-27 02:51, Gabor Grothendieck wrote:
On
Dear R-help list,
I'd like to create visualize the clustering of a dataset with a
dendrogram. I'm using the following script:
data = read.table(data.csv, header=T, sep=;)
require(cluster)
res = as.dendrogram(agnes(data))
chlab - function(n) {
if(is.leaf(n)) {
att - attributes(n)
labx -
Help-Rs
As someone who is newer to R and trying to make the transition from Access into
R, there is a frequetnly used function that I'd like to try and duplicate in
the R world. It involved creating an aggregate table of the top (n) orders
for an item by sum of cost over a select period of
Hello All,
Thanks in advance for all help,
I am trying to read a two column csv file in R, which looks like:
X,1
Y,2
Z,3
I am using R commands:
tmp = read.csv(test.csv, colClasses=c(character, character))
How can make this into a hash table, so that I can access, tmp[X] and it will
return me
On Mon, Sep 26, 2011 at 1:45 PM, Philip Rhoades p...@pricom.com.au wrote:
Gabor, Bill,
On 2011-09-27 02:51, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades p...@pricom.com.au
wrote:
Gabor,
On 2011-09-27 00:35, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011
On Mon, Sep 26, 2011 at 2:55 PM, shikantaza martyn.wilkin...@uhb.nhs.uk wrote:
Hello. I've been trying to change the colour of the bars in the auto.key to
blue and red. I have tried:
barchart(Rate~Digit,Ben,groups=Cat, horizontal=FALSE,ylab=Rate
On the original question though, why isn't there something off the
shelf
that will do what I want? Surely, a boxplot using mean, SD, max and
min
would be a common enough need to justify it?
Gabor Grothendieck replied:
tarr is not a list or a data frame. Use.data.frame(tarr) so
Dear R groups:
I have the data as follows, I want to plot the Rank1 ~ obs30*Cases and
Rank2 ~ obs30*Cases on the same plot as one 3-D scatter plot, how to do
that? Any help is highly appreciated.
ID obs30 Cases RANK1 RANK2
1 0.03175 63 82 81
2 0.0 34 1 34
3 0.0 36 2 41
4 0.0 54 3
Hello R helpers,
I'm trying to use Mahalanobis distance to calculate distance of two time
series, to make some comparations with euclidean distance, DTW, etc, but I'm
having some dificults.
I have, for example, two objects:
s.1 - c( 5.6324702, 1.3994353, -3.2572327, -3.8311846, -1.2248719,
Gabor,
On 2011-09-27 04:31, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 1:45 PM, Philip Rhoades p...@pricom.com.au
wrote:
Gabor, Bill,
On 2011-09-27 02:51, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades
p...@pricom.com.au
wrote:
Gabor,
On 2011-09-27
On Mon, Sep 26, 2011 at 3:24 PM, Philip Rhoades p...@pricom.com.au wrote:
Gabor,
On 2011-09-27 04:31, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 1:45 PM, Philip Rhoades p...@pricom.com.au
wrote:
Gabor, Bill,
On 2011-09-27 02:51, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011
When I first saw your question, I thought the problem might have something to
do with inverting the variance-covariance matrix, S, but that is not the case,
I think:
S for s.1 and s.2:
S
[,1] [,2]
[1,] 1.835044e+01 8.392485e-04
[2,] 8.392485e-04 4.093558e-07
inverse(S):
I don't understand how this function can subset by i when i is missing
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input and behavior:
myfun(vec, i)
## Missing an argument, but error is not caught!
## How is subsetting
Hi,
suppose that we have a triangular upper matrix A
test - matrix(ncol = 4, nrow = 4)
test[1, ] - c(NA,1,1,1)
test[2, ] - c(NA,NA,1,1)
test[3, ] - c(NA,NA,NA,1)
test[4, ] - c(NA,NA,NA,NA)
I know how quickly set diagonal value diag(test) - 1. But how quickly set
down value i.e. matrix is
Dear David and R groups:
I have the data as follows, I want to plot the Rank1 ~ obs30*Cases and
Rank2 ~ obs30*Cases on the same plot as one 3-D scatter plot, how to do
that? Any help is highly appreciated.
//
ID obs30 Cases RANK1 RANK2
1
On Mon, Sep 26, 2011 at 4:09 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
How about: test[lower.tri(test)] - test[upper.tri(test)]
Try it with this data so you can see that it actually works: (the ones
obscure possible false solutions)
test - matrix(ncol = 4, nrow = 4)
Sending it again, with correct subject line.
Hello All,
Thanks in advance for all help,
I am trying to read a two column csv file in R, which looks like:
X,1
Y,2
Z,3
I am using R commands:
tmp = read.csv(test.csv, colClasses=c(character, character))
How can make this into a hash table, so
One additional point, you may want to look at the vis.test function in the
TeachingDemos package for one option of comparing that focuses more on
meaningful or at least visible differences.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
Nope, I was sloppy and missed that. Thanks
... forwarding to list and OP
Michael
On Mon, Sep 26, 2011 at 4:26 PM, William Dunlap wdun...@tibco.com wrote:
My r-help mail is arriving out of order, so perhaps
you have already corrected this, but you need a call
to t() to make this work. Your
hello:
my data looks like:
time1 time2 event catagoria
2004 2006 1 C
2004 2005 0 C
2005 2010 1 E
2007 2009 1 C
2006 2007 0 E
2008 2010 0 C
2008 2010
And, of course, I messed up that example as well by
not reinitializing the matrix. It should be
test[lower.tri(test)] - NA
test
[,1] [,2] [,3] [,4]
[1,] NA123
[2,] NA NA45
[3,] NA NA NA6
[4,] NA NA NA NA
test[lower.tri(test)] -
Hello David,
Thank you for the help anyway. Well answering your question However, I
wonder how much value there is to computing the Mahalanobis distance with
two variables that are measured on such different scales?:
These two variables are subseries of the same time series. What I'm doing is
Hello all,
I'm struggling with POSIXt objects. I've read the refman, the Rnews from 2001
and hopefully all the pertinent help pages.
I'm running windows xp.
It appears my time zone variable isn't set, which hopefully is fine for this
exercise.
Sys.getenv(TZ)
TZ
help(as.POSIXct) states:
On Mon, Sep 26, 2011 at 4:16 PM, Khanvilkar, Shashank
skhan...@qualcomm.com wrote:
Sending it again, with correct subject line.
Hello All,
Thanks in advance for all help,
I am trying to read a two column csv file in R, which looks like:
X,1
Y,2
Z,3
I am using R commands:
tmp =
On 26/09/2011 3:39 PM, Gene Leynes wrote:
I don't understand how this function can subset by i when i is missing
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input and behavior:
myfun(vec, i)
## Missing an argument, but
Chris Conner wrote on 09/26/2011 11:33:05 AM:
Help-Rs
As someone who is newer to R and trying to make the transition from
Access into R, there is a frequetnly used function that I'd like to
try and duplicate in the R world. It involved creating an aggregate
table of the top (n)
On Sep 26, 2011, at 4:16 PM, Khanvilkar, Shashank wrote:
Sending it again, with correct subject line.
Hello All,
Thanks in advance for all help,
I am trying to read a two column csv file in R, which looks like:
X,1
Y,2
Z,3
I am using R commands:
tmp = read.csv(test.csv,
Is there any way to plot a 3-D scatter plot for two groups on one graph?
Thanks,
XINLI
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
On Sep 26, 2011, at 4:56 PM, Duncan Murdoch wrote:
On 26/09/2011 3:39 PM, Gene Leynes wrote:
I don't understand how this function can subset by i when i is
missing
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input
On Mon, Sep 26, 2011 at 3:39 PM, Gene Leynes gley...@gmail.com wrote:
I don't understand how this function can subset by i when i is missing
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input and behavior:
Mhy,
I think that this solution It doesn't work with odd dimension. Suppose we
have a reference matrix 13x13 (near i present a table format i.e save by
write.table). This matrix name a response2.
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13
1 0 1.4142135623731 1 1.73205080756888 1.4142135623731
Hello Everyone,
I need to perform a sample size calculation using a drop the loser/keep the
winner design. I've been searching for examples of how to do this using R but
haven't found much.
The most promising possibility thus far is an R function called DrpLsrNRst.
This appears in the book
Ok,
thanks this solution
test[lower.tri(test)] - t(test)[lower.tri(test)]
works perfectly well :)
Thanks
Best
marcin M.
--
View this message in context:
http://r.789695.n4.nabble.com/Triangular-matrix-upper-to-down-tp3845107p3845352.html
Sent from the R help mailing list archive at
Deal R Users,
I'm trying to find out how can I compute probabilities on a Bayesian
Network using R. The Bayesian Network I modelled is shown at
http://www.dsr.inpe.br/~mello/1727/BNgrapmodel.png and I'd like to know
how can I proceed (commands on R) to answer questions like: (1) what is
the
On Sep 26, 2011, at 5:14 PM, XINLI LI wrote:
Is there any way to plot a 3-D scatter plot for two groups on one
graph?
Color the points?
Thanks,
XINLI
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi, I'm working with support vector machine for the classification
purpose, and I have a problem about the accuracy of prediction.
I divided my data set in train (1/3 of enteire data set) and test (2/3
of data set) using the sample function. Each time I perform the svm
model I obtain
I am trying to find the math behind the tm package findAssocs()
?findAssocs does not say anything besides association and correlate
Usually entering findAssocs at the CLI gives the code for a R
function, but in this case I obtain:
function (x, term, corlimit)
UseMethod(findAssocs, x)
Why exactly do you want to stabilize your results?
If it's in preparation for publication/classroom demo/etc., certainly
resetting the seed before each run (and hence getting the same sample()
output) will make your results exactly reproducible. However, if you are
looking for a clearer picture
On 11-09-26 5:15 PM, David Winsemius wrote:
On Sep 26, 2011, at 4:56 PM, Duncan Murdoch wrote:
On 26/09/2011 3:39 PM, Gene Leynes wrote:
I don't understand how this function can subset by i when i is
missing
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My
On 11-09-26 5:14 PM, XINLI LI wrote:
Is there any way to plot a 3-D scatter plot for two groups on one graph?
If you are using rgl::plot3d, plot the second with add=TRUE.
As David said, use colours or something to distinguish.
For example,
library(rgl)
data1 - matrix(rnorm(30), ncol=3)
On 27/09/11 12:56, Henri-Paul Indiogine wrote:
I am trying to find the math behind the tm package findAssocs()
?findAssocs does not say anything besides association and correlate
Usually entering findAssocs at the CLI gives the code for a R
function, but in this case I obtain:
function (x,
Alan and Duncan,
or test them explicitly with missing(). If you want to do this
automatically, then you shouldn't be using substrings and deparse, you
should work at the language level. But I don't see the reason you want to
do this...
Absolutely. That wasn't the way I wanted to do it,
Actually, this version is more general, doesn't need to know the name of the
function:
f = function(x,y){
curfun = deparse(match.call()[1])
curfun = substr(curfun,1,nchar(curfun)-2)
if(length(formals(curfun))!=nargs())
stop('Something is missing...')
}
f()
Putting this code
Hello,
I am trying to randomly select rows with unique values in columns 1 and 2. I
want to generate multiple subsets to estimate a statistic for each data set.
Below is a simplified example.
L1 L2 L3 L4 L5
1 a b 1 2 3
2 a c 4 5 6
3 a d 7 8 9
4 a e 10 11 12
5 a f 13 14
Dear mailing list,
how can I identify all those rows of matrix B which fulfill some condition
based on another matrix A? More precisely,
A - matrix(c(1, 1, 0, 1, -9, 1, -9, 1, 0, 0, 1, 1, 0, -9, 1, 0, -9, 0, 1, 1,
1, -9, 1, 1, 1), ncol = 5, byrow = TRUE)
B -
Hi,
I want to know about BDS test statistics computation in R (tseries). Does
the numerator of the BDS statistic catculate using bootstrap? If not, how
can I use bootstrap?
I am eagerlt waiting for your reply.
Regards,
Khan
[[alternative HTML version deleted]]
Hello all,
I am brand new to R and doing an exercise for a class. I need to find the
nearest neighbour for points in the following matrix:
DistanceMatrix
x1 x2 x3 x4 x5
[1,] 0.00 2.828427 1.581139 2.236068 2.00
[2,] 2.828427 0.00 1.581139 4.123106
On Sep 26, 2011, at 8:04 PM, Duncan Murdoch wrote:
On 11-09-26 5:15 PM, David Winsemius wrote:
On Sep 26, 2011, at 4:56 PM, Duncan Murdoch wrote:
On 26/09/2011 3:39 PM, Gene Leynes wrote:
I don't understand how this function can subset by i when i is
missing
## My function:
myfun =
On Sep 26, 2011, at 5:42 PM, hasan wrote:
Hello,
I am trying to randomly select rows with unique values in columns 1
and 2. I
want to generate multiple subsets to estimate a statistic for each
data set.
Below is a simplified example.
L1 L2 L3 L4 L5
1 a b 1 2 3
2 a c 4 5 6
It sounds like you've already done the hard(er) part: just use sample(nrow,
noWanted) now to pick which rows to select.
Michael Weylandt
On Sep 26, 2011, at 5:42 PM, hasan halhad...@ucdavis.edu wrote:
Hello,
I am trying to randomly select rows with unique values in columns 1 and 2. I
There's a general no homework policy on this list, but if you use apropos()
with some fairly intuitive search terms the problem won't be hard at all once
you hit the 'magic' function. You also might want to look at ?apply. After
that, ask your TA...
Sorry we couldn't be more help,
Michael
On Sep 26, 2011, at 7:56 PM, Spartina wrote:
Hello all,
I am brand new to R and doing an exercise for a class. I need to
find the
nearest neighbour for points in the following matrix:
DistanceMatrix
x1 x2 x3 x4 x5
[1,] 0.00 2.828427 1.581139
Hi:
The problem is that in your example, you have unequal numbers of rows
in B that match the 1's pattern in A[i, ]. The function below cycles
through the rows of A and returns, for each row of A, the rows in B
that have 1's in the same columns as A[i, ]. By necessity, this
returns a list. Notice
I'm trying to calculate the maximum likelihood estimate for a binomial
distribution. Here is my code:
y - c(2, 4, 2, 4, 5, 3)
n - length(y)
binomial.ll - function (pi, y, n) {## define log-likelihood
output - y*log(pi)+(n-y)*(log(1-pi))
return(output)
}
binomial.mle - optim(0.01,
jango wrote:
I'm trying to calculate the maximum likelihood estimate for a binomial
distribution. Here is my code:
y - c(2, 4, 2, 4, 5, 3)
n - length(y)
binomial.ll - function (pi, y, n) {## define log-likelihood
output - y*log(pi)+(n-y)*(log(1-pi))
return(output)
}
Hi
I want to terminate R process if there are any execution error.
a=a
b=10
c=try(a/b)
if(class(c)[1]==try-error)
{
stop(Wrong Input Value)
}
d=c*c
if c fails then it should terminate the process.
Please can anyone help
--
View this message in context:
Hello,
I am having some trouble coding a two-way anova due to replicated
treatments.
I have a factorial design with three male parents and three female parents.
They were mated in all combinations and their babies were grown out and
measured for size. 50 babies were measured for each of the 9
(a) This is pretty obviously homework; the r-help list is *not* for
giving help with homework.
(b) *Read* the error message!
(c) Your expression for the log likelihood is wrong in more than
one way. (The number of observations is *not* the same thing
as the number of trials for a given
Please adhere to the posting guide (i.e., provide a sample of self contained
code and provide the error message). And what does but it is not working
mean? Is there an error code?
rueu wrote:
hello:
my data looks like:
time1 time2 event catagoria
2004 2006 1 C
Gabor, Bill,
On 2011-09-27 02:51, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades p...@pricom.com.au
wrote:
Gabor,
On 2011-09-27 00:35, Gabor Grothendieck wrote:
On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades
p...@pricom.com.au
wrote:
On 11-09-26 8:49 PM, David Winsemius wrote:
On Sep 26, 2011, at 8:04 PM, Duncan Murdoch wrote:
On 11-09-26 5:15 PM, David Winsemius wrote:
On Sep 26, 2011, at 4:56 PM, Duncan Murdoch wrote:
On 26/09/2011 3:39 PM, Gene Leynes wrote:
I don't understand how this function can subset by i
Can you explain what do you mean by 5 replicate tanks?
Doing a two way anova is very simple in R. You would need to fit a linear model
(lm function).
Eg.:
model - lm(y ~ male + female + male:female, data =)
Regards,
Indrajit
From: Austin Paul
On 11-09-27 12:20 AM, arunkumar wrote:
Hi
I want to terminate R process if there are any execution error.
a=a
b=10
c=try(a/b)
if(class(c)[1]==try-error)
{
stop(Wrong Input Value)
}
d=c*c
if c fails then it should terminate the process.
Please can anyone help
Keep the
Hi,
Yes. As I explained, the three male and three female types were crossed in
all combinations (9 ways). For each of the 9 types, I have *5 replicate
tanks* (45 total tanks). And from each of the 45 tanks I have 50
observations for size. So the 5 replicates are somehow nested within the
99 matches
Mail list logo