Hi,
Here is a little function that will do what you want and return a nice output:
#Function To calculate top two values and return
my.finder - function(mydata) {
my.fun - function(data) {
strongest - which.max(data)
secondstrongest - which.max(data[-strongest])
strongestantenna -
Maybe efficiency is less of an issue than I thought, on 2 million
rows, it only took a bit over a minute, and my system only jumped up ~
600 MB of memory so it wasn't much of a strain there either.
data.test - matrix(
+ sample(seq(min(yourdata),max(yourdata)), size = 1000, replace = TRUE),
If I am not wrong, it seems that you want to get factor counts in the
whole scale of data.raw. Maybe you can do that just like this:
table(data.raw)
On Sat, Jul 24, 2010 at 1:44 AM, Marcus Liu marcusliu...@yahoo.com wrote:
Hi everyone,
Is there any command for updating table withing a loop?
Fahim Md wrote:
Is there any function/way to merge/unite the following data
GENEID col1 col2 col3col4
G234064 1 0 0 0
G234064 1 0 0 0
Hello,
2010/7/24 jim holtman jholt...@gmail.com:
Well, I took you equation and put the following at the start:
Power - function(x,y) x^y
EE - function(x) x
alp - 2
x - 900*Power(-0.2030178326474623 + 0.23024073983368956*(1 - alp) +
...
Actually, there are many functions like this
2010/7/24 David Winsemius dwinsem...@comcast.net:
On Jul 23, 2010, at 10:29 PM, jim holtman wrote:
It has some interesting properties with that identity definition of EE(x).
Local maxima at 1 and 0, blows up beyond -1 and 2, and several local
minima nearby:
Math.Fn - function(alp) {
Hi R gurus, here I am trying to understand how R define and work with the
prototype property in class definition. Here I have created a class:
setClass(a, representation=list(x=numeric, y=character))
[1] a
As I did not explicitly define the prototype in above code, R is supposed to
generate
On 7/22/2010 2:21 PM, Graves, Gregory wrote:
Among those users of Primer, stress values greater than 0.3 are
interpreted as questionable. Using both isoMDS and metaMDS (vegan
package), the stress values returned are much higher using my own data
and using examples provided in R Help. For
as.vector(t(outer(A, B)))
[1] 9 10 11 12 18 20 22 24 27 30 33 36
HTH,
Dennis
On Fri, Jul 23, 2010 at 8:11 AM, aegea gche...@gmail.com wrote:
Thanks in advance!
A=c(1, 2,3)
B=c (9, 10, 11, 12)
I want to get C=c(1*9, 1*10, 1*11, 1*12, ., 3*9, 3*10, 3*11, 3*12)?
C is still a vector
My thought is this:
It depends on what you have in the panel. Are your data cross-section data
observed over ten years for, say, 3 countries (or regions within the same
country)? If so, yes you can perform integration properties (what people
usually call unit root test) and then test for
Let me correct an omission in my response below. The last sentence
should read But if the data are 10 quarterly or monthly values, these
techniques are not relevant.
Cheers
Lexi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of
Let me correct an omission in my response below. The last sentence
should read But if the data are 10 quarterly or monthly values, these
techniques are not relevant.
Cheers
Lexi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of
On Jul 23, 2010, at 9:20 PM, mpw...@illinois.edu wrote:
I have a data frame with a couple million lines and want to retrieve
the largest and second largest values in each row, along with the
label of the column these values are in. For example
row 1
strongest=-11072
secondstrongest=-11707
Hi, R users
I need to use the function (locpoly) to fit a local poynomial regression model,
The defult for kernal function is normal , but I need to use different
kernal functions such as :Uniform,Triangular,Epanechnikov,..
Could someone help me define these functions to fit local
Hello everyone,
I wonder if sample size can be used as weight in a weighted mixed model. Or
should I use just the inverse of the variance?
For example, the class'lmer' in the 'lme4' package have an option 'weights'
(as in the class 'lm' of 'stats'). In the help of lme4 there is an example
Thanks Murphy and pikal,
I need another help,for fitting first fourier transformation ,i used
following thing .Please advise on this
beer_monthl has 400+ records
EXample:
head(beer_monthly)
beer
1 93.2
2 96.0
3 95.2
4 77.1
5 70.9
6 64.8
time-seq(1956,1995.2,length=length(beer_monthly))
On Sat, Jul 24, 2010 at 2:23 AM, Jeff Newmiller
jdnew...@dcn.davis.ca.us wrote:
Fahim Md wrote:
Is there any function/way to merge/unite the following data
GENEID col1 col2 col3 col4
G234064 1 0 0
On 07/23/2010 06:50 PM, Ravi Varadhan wrote:
Dear UseRs!,
Everything about UseR! 2010 was terrific! I really mean everything - the
tutorials, invited talks, kaleidoscope sessions, focus sessions, breakfast, snacks,
lunch, conference dinner, shuttle services, and the participants. The
On Fri, 23 Jul 2010, Marcus Liu wrote:
Hi everyone,
Is there any command for updating table withing a loop??
Loops? We don't need no stinking loops!
(From 'The Good, the Bad, and the Rgly')
tab - table(data.raw, findInterval(seq(along=data.raw), ind+1 ) )
tab %*%
On 24/07/2010 11:25 AM, Charles C. Berry wrote:
On Fri, 23 Jul 2010, Marcus Liu wrote:
Hi everyone,
Is there any command for updating table withing a loop?�
Loops? We don't need no stinking loops!
(From 'The Good, the Bad, and the Rgly')
Actually, that quote comes from
blackscorpio olivier.collignon at live.fr writes:
I'm currently attempting to predict the occurence of an event (factor)
having more than 2 levels with several continuous predictors. The model
being ordinal, I was waiting the glm function to return several intercepts,
which is not the case
Hi,
I'm doing a function that describe two populations in competition.
that's the function that i wrote:
exclusao-function(n10, n20, k1, k2, alfa, beta, t){
n1-k1-(alfa*n20)
n2-k2-(beta*n10)
if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c
(1:t)), ylim=range(n10, n20), xlab='tempo',
Hi,
I'm doing a function that describe two populations in competition.
that's the function that i wrote:
exclusao-function(n10, n20, k1, k2, alfa, beta, t){
n1-k1-(alfa*n20)
n2-k2-(beta*n10)
if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c
(1:t)), ylim=range(n10, n20), xlab='tempo',
Can someone please recommend to me a book on the programming language that R is
based on? I'm looking for a foundational book that teaches the logic of the S
language. It seems that knowing the underpinnings of the language can only make
using R a bit easier.
Any leads are greatly appreciated
Try this:
c(as.matrix(B) %*% A)
On Fri, Jul 23, 2010 at 12:11 PM, aegea gche...@gmail.com wrote:
Thanks in advance!
A=c(1, 2,3)
B=c (9, 10, 11, 12)
I want to get C=c(1*9, 1*10, 1*11, 1*12, ., 3*9, 3*10, 3*11, 3*12)?
C is still a vector with 12 elements
Is there a way to do that?
Hi Matt,
http://www.r-project.org/doc/bib/R-books.html
Lists a variety of books, and seems to include most (i.e., my
searches through google, amazon, and barnes and noble, didn't really
turn up others) books dedicated to R. I have always been under the
impression that Programming with Data
On Fri, Jul 23, 2010 at 11:11 AM, aegea gche...@gmail.com wrote:
Thanks in advance!
A=c(1, 2,3)
B=c (9, 10, 11, 12)
I want to get C=c(1*9, 1*10, 1*11, 1*12, ., 3*9, 3*10, 3*11, 3*12)?
C is still a vector with 12 elements
Is there a way to do that?
Here are yet a few more. The first
Matt,
you might want to check out programming with data by John Chambers.
http://www.amazon.com/Programming-Data-Guide-S-Language/dp/0387985034/ref=sr_1_1?ie=UTF8s=booksqid=1279990404sr=8-1
Best Joe
On Sat, Jul 24, 2010 at 11:39 AM, Matt Stati mattst...@yahoo.com wrote:
Can someone please
Look at the logspline package. This is a different approach to density
estimation from the kernel densities used by 'density', but does allow you to
set fixed boundaries.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
Hi,
I am using maanova package for analysis. In my dataset, two fixed factors
time and treatment and sample as random factor is there. Am able to get
madata object and fitmaanova object. But, am unable to do f-test with two
factors, but i have done f-test seperately for two factors.
You may want to look at the biglm package as another way to regression models
on very large data sets.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
Hi,
I was wondering if anyone knows of a method (or if it's possible) to use R in
interpolating Landsat ETM+ data gaps?
Regards,
Hakim Abdi
_
Abdulhakim Abdi, M.Sc.
Conservation GIS/Remote Sensing Lab
Smithsonian Conservation Biology Institute
Hi:
I have a dataframe named 'spring' and I am trying to add a new variable named
'IdDate'
This line of code works fine:
spring$idDate - seq(as.Date(2008-07-01),as.Date(2009-06-30),by=week)
But I don't want to hardcode the year because it will be used again the
following year
Is it possible to
Try this:
format(seq(as.Date(2008-07-01),as.Date(2009-06-30),by=week), %d/%m)
On Sat, Jul 24, 2010 at 6:07 PM, Felipe Carrillo
mazatlanmex...@yahoo.comwrote:
Hi:
I have a dataframe named 'spring' and I am trying to add a new variable
named
'IdDate'
This line of code works fine:
2010/7/23 w 霍 hw_joyce...@hotmail.com:
I use the constrOptim to maximize a function with four constriants but the
answer does not leave from the starting value and there is only one outer
iteration. The function is defined as follows:
tm-function(p){
p1-p[1]; p2-p[2]; p3-p[3];
Is this what you want if you want to assume that the date without a
year is this year:
seq(as.Date(7-1,%m-%d),by=week, length=52)
[1] 2010-07-01 2010-07-08 2010-07-15 2010-07-22 2010-07-29
2010-08-05 2010-08-12 2010-08-19
[9] 2010-08-26 2010-09-02 2010-09-09 2010-09-16 2010-09-23
2010-09-30
As far as I know, glm only works with dichotomous or count data. polr in
the MASS package works and so does lrm {Design} for ordinal dependent
variables. I would assume that the model produced by glm is a dichotomous
version of your model but not sure. Only one intercept would be given
because
On Jul 24, 2010, at 4:54 PM, mpw...@illinois.edu wrote:
THANKS, but I have one issue and one question.
For some reason the secondstrongest value for row 3 and 6 are
incorrect (they are the strongest) the remaining 10 are correct??
In my run of Wiley's code I instead get identical values
On Sat, Jul 24, 2010 at 5:09 PM, David Winsemius dwinsem...@comcast.net wrote:
On Jul 24, 2010, at 4:54 PM, mpw...@illinois.edu wrote:
THANKS, but I have one issue and one question.
For some reason the secondstrongest value for row 3 and 6 are incorrect
(they are the strongest) the
On Jul 24, 2010, at 8:09 PM, David Winsemius wrote:
On Jul 24, 2010, at 4:54 PM, mpw...@illinois.edu wrote:
THANKS, but I have one issue and one question.
For some reason the secondstrongest value for row 3 and 6 are
incorrect (they are the strongest) the remaining 10 are correct??
In
On Jul 24, 2010, at 9:27 PM, David Winsemius wrote:
On Jul 24, 2010, at 8:09 PM, David Winsemius wrote:
On Jul 24, 2010, at 4:54 PM, mpw...@illinois.edu wrote:
THANKS, but I have one issue and one question.
For some reason the secondstrongest value for row 3 and 6 are
incorrect (they
Dear all,
how can i do the calculate the C-statistics
95% confidences interval for the cox regression model.
Thanks very much for your any help.
Paaveenthan
_
[[elided Hotmail spam]]
On Sat, Jul 24, 2010 at 08:55:01AM -0500, Frank E Harrell Jr wrote:
On 07/23/2010 06:50 PM, Ravi Varadhan wrote:
I want to echo what Ravi said. The talks were terrific (thanks to
the program committee and the speakers) and Kate Mullen and her team
did an extraordinary job in putting the
On 07/24/2010 09:51 PM, paaventhan jeyaganth wrote:
Dear all,
how can i do the calculate the C-statistics
95% confidences interval for the cox regression model.
Thanks very much for your any help.
Paaveenthan
install.packages('Hmisc')
require(Hmisc
?rcorr.cens (there is an example at
Dear all,
I'm working with a code that consists of two parts: In Part 1 I'm generating
a random graph using the igraph library (which represents the relationships
between different nodes) and a vector (which represents a certain
characteristic for each node):
library(igraph)
g -
45 matches
Mail list logo