But still wrong... needs to be calculated in two steps because the cars are
seen in multiple frames.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live G
FYI, increased it to 3M rows of data and it took 0.3 seconds to summarize it:
> system.time({
+ # summarize the slot & Class
+ result <- DF[
+ , list(Total = .N # count of entries
+ , mVel = mean(velocity) # average velocity
+ )
+ , keyby = 'slot,Class'
+ ]
+ })
us
Here is another way of doing it using the data.table package. Tried
using new new 'dplyr' package, but it had problems.
> # create some test data
> N <- 3 # rows of data
> set.seed(1)
> DF <- data.frame(vehicle = sample(1:5, N, TRUE)
+ , frame = sample(22:9322, N, TRUE)
+
Hi everybody,
I am writing the .Rd files of my pckage, and I have a doubt in relation with
the Rd file of a function that has dots as unique argument.
I mean the following:
g <- function(a,b) a + b
f <- function( ... ) g(...)
Imagine I have the Rd file of "f" function. The "usage" is as follo
Hi,
dat1 <- read.table(text="X1
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3",sep="",header=TRUE)
dat2 <- setNames(as.data.frame(matrix(dat1[,1],3,3)),paste0("X",1:3))
str(dat2)
#'data.frame': 3 obs. of 3 variables:
# $ X1: Factor w/ 3 levels "1,1","1,2","1,3": 1 2 3
# $ X2: Factor w/ 3 levels "2,1",
Hi,
I tried to use nls() to fit a complex-valued (non linear) function that
looks like this:
y = A + B / (1 + C * (i*x*D)^E)
where x is the real-valued independent variable, A,B,C,D,E are
real-valued parameters and i is the imaginary unit.
I had the followin error (my translation into englis
Hi
I submited the rankhospital project. All parts were correct except part 2.
I checked the outcome and it looks correct. I am afraid I am
misunderstanding the requirement. Please let me know why the outcome is not
correct.
*THE OUTCOMEMy test*
> source("rankhospital.R")
> d<-rankhospital("WA","
Hi,
The question is not clear.
set.seed(45)
spe <- data.frame(Col1=sample(c(1:10,letters[1:2]),400,replace=TRUE))
mat1 <- matrix(spe[,1],nrow=20,ncol=20)
#If you want to replace the non-numeric values with NAs,
mat2 <- matrix(as.numeric(as.character(spe[,1])),nrow=20,ncol=20)
A.K.
Hell
You could also use a new environment for each chapter
e1 <- new.env()
with(e1, A <- c(1,2,3)) # or, if you prefer, e1$A <- c(1,2,3)
However, you may want to also reload packages at the start
of each chapter (I think this makes it more reader-friendly),
so perhaps you should restart R for each
Sorry, messed up the second ddply example:
dta3 <- ddply( dta2, c("slot","classf"), function(DF){data.frame(
Total=nrow(DF),
MeanVelocity= mean( DF$TimeMeanVelocity ) ) } )
---
Jeff NewmillerThe .
While you seem to be making some progress in communicating your problem, the
format is still HTML (so it is a mess) and the subject and approach of the
question are still a poor fit for this list. We are not here to DO your work
for you, yet you seem to have an overly long list of "needs" that s
Just curious -- why do you continue to post in HTML when you have been
asked not to?
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
On Sat, Jan 25, 20
Hello everyone,Here is the version using dput. I am sorry for the junk I posted
before. I have a large vehicle trajectory data of which following is a small
part:
structure(list(vehicle = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L,2L, 2L), frame =
c(221L, 222L, 223L, 224L, 115L, 116L, 117L, 118L, 11
[I don't know whether you cc'd this to r-help or not, I'm cc'ing this
back]
Without more context it's hard to say very much, and you might be
better off on the r-sig-ecol...@r-project.org list , or on
CrossValidated (http://stats.stackexchange.com), rather than the general
r-help list (this i
You could initialize one list per chapter,
> x1 <- list( "Chapter One" )
and then crate your variables as list members
> x1$A <- c( 1, 2, 3 )
> x1$B <- "bla"
> x1$tv.data <- data.frame( m = sample( LETTERS, 5 ),
n = round( runif( 5 ), 2 ) )
> x1
[[1]]
[1] "Chapter O
Pablo Ignacio Escribano Pinto gmail.com> writes:
>
> Hi all!
> I am currently working on a paper where I conduct a
> surface analysis based on subordinate and supervisor responses.
> So far I have been using the RSA package and it works great.
> However, because several subordinates share a com
Daniel Patón Domínguez gmail.com> writes:
>
> > The library of packages that installs with R includes the stats
> > package, in the stats package is the glm function for fitting
> > generalized linear models. Using glm with a binomial family will fit
> > a logistic regression which can be used
Hi everyone,
I am new to additive modelling and am surprised by the results of a model
I'm working on. I wanted to check with more experienced users to make sure
I'm not misunderstanding something basic.
*Data:* I have 10 replicated runs from an evolutionary simulation model,
measuring the evolv
I am sorry for the previous mail, it happened due to the tables I copied into
mail. Here is the text version:Hello everyone,
I have a large vehicle trajectory data of which following is a small part:
vehicle frame globalx class velocity lane1 221 6451260 223.37
51
!length(SPY["2009-01-18"])
#[1] TRUE
!length(SPY["2009-01-16"])
#[1] FALSE
#or
!nrow(SPY["2009-01-16"])
A.K.
On Saturday, January 25, 2014 10:27 AM, ce wrote:
Dear all
How to test if xts date exists ? is.null doesn't work. SPY["2009-01-18"]
doesn't exist but I can't catch it in my scri
Dear all
How to test if xts date exists ? is.null doesn't work. SPY["2009-01-18"]
doesn't exist but I can't catch it in my script.
library(quantmod)
getSymbols("SPY")
> SPY["2009-01-16"]
SPY.Open SPY.High SPY.Low SPY.Close SPY.Volume SPY.Adjusted
2009-01-1685.8685.99 83.
Dear Brian and Xing,
Sandy Weisberg and I coincidentally encountered this issue yesterday, and I
intended to send a message about it to the r-help list. We thought initially
that the functions we were working on were bugged, but eventually discovered
that polym() wasn't saving basis information
Try XLConnect. It seems to read the data in just fine. Did have to
create a named region, otherwise it would just read in the area that
had data.
> require(XLConnect)
> wb <- loadWorkbook("C:\\Users\\Owner\\Downloads\\Book1 (1).xlsx")
> x <- readWorksheet(wb, 1, header = FALSE) # without region
Hi Luigi
If you create a numeric variable of 1:5 to correspond as the x's - Normal,
Borderline, .
You could then plot the points as an xyplot -xyplot gives you more
flexibility to do things.
then add the lines as segments in a panel function
Use scales for the labels as
scales = list(x = l
> The library of packages that installs with R includes the stats
> package, in the stats package is the glm function for fitting
> generalized linear models. Using glm with a binomial family will fit
> a logistic regression which can be used as you describe.
>
> If you really feel the need to us
kindly help and guide me how i can correct this code, my target is to find
x1,x2,x3 but when the matrix is positive definite i do get
the solution correctly as you can see from the code but when the matrix is
indefinite we dont get the solution . i want know how i can correct this
problem if th
26 matches
Mail list logo