On Wed, Oct 10, 2012 at 7:09 PM, ramoss wrote:
> In SAS I use the following code:
>
> proc sort data=upper;
> by tdate stock_symbol expire strike;
> run;
> data upper1;
> set upper;
> by tdate stock_symbol expire strike;
> if first.expire then output;
> rename strike=astrike;
> run;
>
>
Hi,
I am using the package PTAK and in particular the command Candpara to
perform the Parafac factorizationor of a tensor.
The results are not encouraging as I expected, I'm starting a phase of
analysis to see if there are errors.
I pose a question and I hope you can help me.
The command to run th
Hi,
I am looking for case studies, possibly real world, in forensic domain that
will entice forensic computing students and demonstrate the usefulness of
machine learning in forensics. Does anyone know of any such case studies?
Students should be able to replicate the case study, so it should hav
Hi Sergio,
based on my understanding ( see Wood Generalized Additive Model)
smoothing basis incorporates the intercept already, due to identifiable
issues. Therefore the intercept is always specified and you don't need
to specify. I guess that your m2 to model is simply not correct.
Hope it help
Dear All,
at the moment I am using R for calculations of large databases.
Unfortunately, R only manages to complete certain operations at some
times, and not at others. I usually get the error message "cannot allocate
vector of size XX"
I am using the 64-bit version with Windows 7. While my
Hello,
I have a problem, with your data example my results are different. I
have changed the names of two of the variables, to allow for 'pre' and
'post' to be first in the names.
# auxiliary functions
ifswap <- function(x)
if(x[1] %in% c("pre", "post")) x[2:1] else x
getpair <- function
> If I use a nested ifelse statement in a loop it takes me 13
> minutes to get an answer on just 50,000 rows.
> ...
> ifelse(strataID[i+1]==strataID[i], y<-x[i+1], y<-x[i-1]))
maybe take a closer look at the ifelse help page and the examples?
First, ifelse is intended to be vectorized. If you
Baoqiang,
Here's an approach that should work:
(1) Make sure that the column names of trainx and testx are the same.
(2) Combine trainy and trainx into a data frame for fitting the model.
(2) Use the newdata= argument in the predict() function.
(3) Convert testx from matrix to data frame.
# some
> What does the sudden appearance of "Contacting Delphi
> ..the oracle is unavailable.
> We apologize for any inconvenience." mean? A bug? It appears
> at plotting.
If you have an ordinary plot command, that is very strange indeed. It's a help
message ... of sorts*. It should be no more li
In performance analytics - performance summary session , i cant run the
code of -
charts.PerformanceSummary(datafrom_table, rf = 0, main = NULL, method =
"ModifiedVaR", width = 0,event.labels = NULL, ylog = FALSE, wealth.index =
FALSE, gap = 12)
it just return blank chart.
datafrom_table - h
Hifor all...
I have tried jack.jill dataset in BCA package.This Dataset actually contains
557 observations and 8 variables.but i have got only 2 obsevations.anybody
tried this same function.You people got same answers like me or getting as
usual values? Please reply me
by
Kokila.k
Sorry but I don't modified my function with "mle2" :( :(
Can you give example how to obtain Hessian with numDeriv ?
Serdar
# Function
Linn=function(param){
phi1=((param[1]^2/(1+param[1]^2)))
phi2=((param[2]^2/(1+param[2]^2)))
phi3=((param[3]^2/(1+param[3]^2)))
phi
Brilliant! Thank you both, this works!
Combined with the other suggestion of setting stringsAsFactors to FALSE when
reading in the data frame, I now have the behaviour I wanted.
I had been beginning to get the sense that one of the apply functions was
the solution. I will now do some reading on
Old topic...
An answer may be useful for someone else, though...
Just do :
> environment(write.dbfMODIF)<-environment(foreign::write.dbf )
and it should be good to go.
Cheers,
--
View this message in context:
http://r.789695.n4.nabble.com/column-width-in-dbf-files-using-write-dbf-to-be-con
Dear all,
I am new to R and I am familiar with very basic stuff. I am trying to create
tables in text format from each row of my table and export these tables with
specific attribute in the table. I tried after reading some forums but
nothing worked. Can you please help me.
ex:
dataGT
ID St
Hi,
I tried this function on an example dataset and it seems to be working.
extract.plm <- function(model) {
if (!class(model)[1] == "plm") {
stop("Internal error: Incorrect model type! Should be a plm object!")
}
zz1<-summary(model)$coef[,1:2]
zz2<-as.data.frame(apply(zz1,2,function(x) sprintf(
On Thu, Oct 11, 2012 at 11:04 AM, sheenmaria wrote:
> In performance analytics - performance summary session , i cant run the
> code of -
> charts.PerformanceSummary(datafrom_table, rf = 0, main = NULL, method =
> "ModifiedVaR", width = 0,event.labels = NULL, ylog = FALSE, wealth.index =
> FALSE
On Thu, Oct 11, 2012 at 2:04 PM, kallu wrote:
> Dear all,
>
> I am new to R and I am familiar with very basic stuff. I am trying to create
> tables in text format from each row of my table and export these tables with
> specific attribute in the table. I tried after reading some forums but
> nothi
HI Rui,
By running your code, I got the results as:
result
# MeanDiff CIlower CIupper p.value
#apple -12.6 -16.68052 -8.519476 0.0010166626
#banana -15.0 -17.91196 -12.088040 0.0001388506
#orange -18.2 -22.79583 -13.604166 0.0003888560
>From my code:
res3
# meandi
de.pwc.com> writes:
> at the moment I am using R for calculations of large databases.
> Unfortunately, R only manages to complete certain operations at some
> times, and not at others. I usually get the error message "cannot allocate
> vector of size XX"
>
> I am using the 64-bit version wi
Dear everyone,
I'm trying to do a dotplot with the libraries "lattice" and "latticeExtra".
However, no proper representation of the values on the vertical y-axis is
done by ".R". Instead of choosing the actual values of the numeric variable,
".R" plots the rank of the value. That is, there are val
That's perfect, thanks a lot!
Tonja
Gesendet: Mittwoch, 10. Oktober 2012 um 21:37 Uhr
Von: "William Dunlap"
An: "tonja.krue...@web.de" , "r-help@r-project.org"
Betreff: RE: [R] own function: computing time
Your original method would be the following function
f <- funct
Hello,
If that is the problem now, then change the variables' names.
In what follows, the first line is just the example you gave. In the
actual runnunig code uncomment the commented out lines.
vars <- c("red_apple_pre", "post_banana_organic")
#vars <- names(dat)
vars <- gsub("_pre", "=pre",
On Thu, 11 Oct 2012 14:45:16 +0200,
wrote:
> Dear All, at the moment I am using R for calculations of large
> databases. Unfortunately, R only manages to complete certain
> operations at some times, and not at others. I usually get the error
> message "cannot allocate vector of size XX"
> I am
Hello,
Em 11-10-2012 15:14, arun escreveu:
HI Rui,
By running your code, I got the results as:
result
# MeanDiff CIlowerCIupper p.value
#apple -12.6 -16.68052 -8.519476 0.0010166626
#banana-15.0 -17.91196 -12.088040 0.0001388506
#orange-18.2 -22.79583 -13.604166 0.
On Oct 11, 2012, at 9:55 AM, "Sebastian P. Luque" wrote:
> On Thu, 11 Oct 2012 14:45:16 +0200,
> wrote:
>
>> Dear All, at the moment I am using R for calculations of large
>> databases. Unfortunately, R only manages to complete certain
>> operations at some times, and not at others. I usually
On Oct 11, 2012, at 6:48 AM, Andres LaCortadora wrote:
> Dear everyone,
>
> I'm trying to do a dotplot with the libraries "lattice" and "latticeExtra".
> However, no proper representation of the values on the vertical y-axis is
> done by ".R". Instead of choosing the actual values of the numeric
It appears you are using the approach "throw every method at a problem and
select the
answer you like". I use this quite a lot with optimx to see just what disasters
I can
create, but I do so to see if the software will return sensible error messages.
You will have to provide a reproducible exam
Hi all,
New to R, so this may be obvious to some.
I've been trying to figure this out for a while, I have a dataset "events"
that looks something like this:
AreaNAMEDATEX Xn Y
1 X 1/10/10 1 1 0
1 Y 1/11/10
Hi Shantanu,
I guess the below code should solve both the issues:
set.seed(432)
dat2<-data.frame(apple_pre=sample(10:20,5,replace=TRUE),orange_post=sample(18:28,5,replace=TRUE),pre_banana=sample(25:35,5,replace=TRUE),post_apple=sample(20:30,5,replace=TRUE),banana_post=sample(40:50,5,replace=TRUE)
Dear users,
I am preparing a presentation in latex(beamer) . I would like to show parts
of my plots per click. Example, consider I have two time series x and y:
x<-ts(rnorm(100), start=1900,end=1999)
y<-ts(rnorm(100), start=1900,end=1999)
plot(x)
lines(y,col=2)
Then I imported this plot into late
Hello all,
I cannot seem to figure out this seemingly simple procedure.
I want to sort a data frame by a specified character vector.
So for :
df.. <- data.frame(Season=rep(c("Summer","Fall","Winter","Spring"),4),Obs=
runif(length(rep(c("Summer","Fall","Winter","Spring"),4
I want to so
a fortune?
On 10/11/2012 9:56 AM, John C Nash wrote:
Indeed in several years on the list, I've never seen a query with a short,
testable case
fail to get an answer very quickly.
JN
--
Spencer Graves, PE, PhD
President and Chief Technology Officer
Structure Inspection and Monitoring,
?order
df[order(yourcolumn, ]
-- Bert
On Thu, Oct 11, 2012 at 10:08 AM, LCOG1 wrote:
> Hello all,
>I cannot seem to figure out this seemingly simple procedure.
>
> I want to sort a data frame by a specified character vector.
>
> So for :
>
> df.. <- data.frame(Season=rep(c("Summer","Fall","
Dear All,
Â
I have a questions I would like to ask about and wonder if you have any
thoughts to make it work in R.
Â
1. I work in the field of medicine where physiologic variables are often
simulated, and they can not have negative values. Most often the assumption is
made to simulate this pa
Thank you, Dr. Therneau, that was very helpful.
Best regards,
Omar.
On Mon, Oct 8, 2012 at 9:58 AM, Terry Therneau wrote:
>
>> I am interested in producing the expected number of events, in a
>> recurring events setting. I am using the Andersen-Gill model, as fit
>> by the function "coxph" in
Hi,
In your dataset, it seems like it is already ordered in the way you wanted to.
df.. <- data.frame(Season=rep(c("Summer","Fall","Winter","Spring"),4),Obs=
runif(length(rep(c("Summer","Fall","Winter","Spring"),4
#Suppose the order you want is:
vec2<-c("Summer","Winter","Fall","Spring")
df1
On 11-Oct-2012 17:22:44 Andras Farkas wrote:
> Dear All,
> I have a questions I would like to ask about and wonder if you
> have any thoughts to make it work in R.
>
> 1. I work in the field of medicine where physiologic variables
> are often simulated, and they can not have negative values.
> Mos
Sorry, you **did** supply data and my solution **does** work (except I
left off 1 closing ")" .
> sq.n <- seq_len(nrow(data.df))
> tapply(sq.n,data.df$seq,function(x)with(data.df[x,],
+ sort(unique(do.call(c,mapply(seq,from=startNo,length=len,SIMPLIFY=FALSE))
$`1`
[1] 3 4 5 6 10 11
$`2`
[
Sorry if I wasn't clear but the result I am looking for is as follows
# Season Obs
#1 Summer 0.2141001
#5 Summer 0.2141001
#9 Summer 0.2141001
#13 Summer 0.2141001
#3 Fall 0.6722337
#7 Fall 0.6722337
#11 Fall 0.6722337
#15 Fall 0.6722337
#2 Winter 0.9318599
#6 Winter 0.931859
On 11/10/2012 1:08 PM, mamush bukana wrote:
Dear users,
I am preparing a presentation in latex(beamer) . I would like to show parts
of my plots per click. Example, consider I have two time series x and y:
x<-ts(rnorm(100), start=1900,end=1999)
y<-ts(rnorm(100), start=1900,end=1999)
plot(x)
lines
Hello,
I have got a cluster sample using an election dataset where I already
had the final results of a county-specific election. I am trying to
figure out what would be the best sampling design for my data.
The structure of the dataset is:
1) polling station (in general schools where people vo
On Thu, Oct 11, 2012 at 10:43 AM, ROLL Josh F wrote:
> Sorry if I wasn't clear.
Actually, my bad -- I didn't read carefully enough.
But the answer is still essentially correct -- just change the
ordering of the levels of Season, which, by default, is alphabetic.
df$Season <- factor(df$Season, le
HI,
In this case, specifying the factor levels would be easier.
Try this:
set.seed(1)
df <- data.frame(Season=rep(c("Summer","Fall","Winter","Spring"),4),Obs=
runif(length(rep(c("Summer","Fall","Winter","Spring"),4
df1<-within(df,{Season<-factor(Season,levels=c("Summer","Fall","Winter","Spring"
I'm pretty sure you were already given the answer: order() in
conjunction with a factor with the level in an order you specify.
mydf$Season <- factor(mydf$Season, levels=c("Summer","Fall","Winter","Spring"))
mydf[order(mydf$Season),]
Thanks for making sure to include the context in your replies
It looks like friedman in "agricolae" package handles replicates by
averaging and then doing the unreplicated Freidman analysis. Any pointers
to the fully replicated analysis, given, for ex., in Conover, Practical
Nonparametric Statistics (3rd Edn.), pp 383f? Thanks, John
--
View this message
Hi,
I get a 404 page not found on the root. There is not webmaster link on
r-project.org that I can see. Whom should I contact? Thanks
Antonio
PS: Yes I was trying to report my first bug. It's a conspiracy with p <
0.01.
[[alternative HTML version deleted]]
___
I'm trying to figure out how to repeat a series of commands in R and have the
outputs added to a dataframe after each iteration.
My code starts this way...
a<-read.csv("File1.csv")
b<-read.csv("File2.csv")
a$Z<-ifelse(a$Z=="L",sample(1:4,length(a$Z),replace=TRUE),ifelse(a$Z=="M",sample(5:8,lengt
Hello,
To aggregate the data use, yes, it's exists, function aggregate.
with(dat, aggregate(cbind(X, Xn, Y), list(Area, DATE), FUN = sum))
# output
Group.1 Group.2 X Xn Y
1 1 1/10/10 1 1 0
2 1 1/11/10 0 0 1
3 1 1/12/10 3 0 0
4 2 2/12/10 2 1 1
5 2 2/13/10 3 0
encapsulate them into a function and call the function ??
-- Bert
On Thu, Oct 11, 2012 at 11:09 AM, KoopaTrooper wrote:
> I'm trying to figure out how to repeat a series of commands in R and have the
> outputs added to a dataframe after each iteration.
>
> My code starts this way...
>
> a<-read.
Ted,
Â
thanks for the answer. I actually think I have it the other way around. Let me
give you an example:
Â
1. I know the mean parameter value of a variable (V), lets call it M with a
value of 5, and I also know the SD, let us call it SD with a value of 3:
#V
M <-5
SD <-3
Â
2. Usually in case
(I made a slip with the mulstivariate case below: see at [***])
On 11-Oct-2012 17:51:51 Ted Harding wrote:
> On 11-Oct-2012 17:22:44 Andras Farkas wrote:
>> Dear All,
>> I have a questions I would like to ask about and wonder if you
>> have any thoughts to make it work in R.
>>
>> 1. I work in th
We would like to announce the following statistics course:
Data exploration, regression, GLM & GAM. With introduction to R
When: 4 - 8 February 2013.
Where: Coimbra, Portugal.
For details, see: http://www.highstat.com/statscourse.htm
Course flyer: http://www.highstat.com/Courses/Flyer2013FebC
HI Shantanu,
I saw your reply to Rui regarding multiple underscores in Nabble:
(Actually, I see now that part of the problem is that many of the
names have multiple underscores such as "red_apple_pre" or
"post_banana_organic". I think this is causing a problem for this line
in your code:)
I w
On Oct 11, 2012, at 19:56 , Antonio Piccolboni wrote:
> Hi,
> I get a 404 page not found on the root. There is not webmaster link on
> r-project.org that I can see. Whom should I contact? Thanks
>
The machine hosting the bug tracker is having some issues. Just wait for the
dust to settle...
-
On 11.10.2012 19:56, Antonio Piccolboni wrote:
Hi,
I get a 404 page not found on the root. There is not webmaster link on
r-project.org that I can see. Whom should I contact? Thanks
Thanks for the note.
The servers where the bug tracker is installed are experiencing problems
that are known. Th
I have been looking for a way to write R-generated reports to Microsoft
Word documents. In the past, I used the package R2wd, but for some reason
I haven't been able to get it to work on my current set up.
R version 2.15.0 (64-bit)
Windows 7 Enterprise - Service Pack 1
Mi
On Fri, Oct 12, 2012 at 6:56 AM, Sebastián Daza
wrote:
> Hello,
>
> I have got a cluster sample using an election dataset where I already
> had the final results of a county-specific election. I am trying to
> figure out what would be the best sampling design for my data.
>
> The structure of the
Hi, new in R and I would like to start with calculating an incidence rate. My
data is imported into R from a tab delimited txt file, as shown below:
ID DATE_BIRTH DATE_UNT EVENT TIME_EV
1 4867 08/02/1959 19/10/2001 1 31
2 52 15/07/1941 08/02/1999 1 6
3 63 02/01/1946 11/0
Dear all,
I have a problem with the command 'getURL' from the RCurl package, which I
have been using to obtain a ftp directory list from the MOD16 (ET, DSI)
products, and then to download them. (part of the script by Tomislav
Hengl, spatial-analyst). Instead of the list of files (from ftp), I am
Hello R help,
I have a question similar to what is posted by someone before. my
problem is that Instead of last assessment, I want to choose last two.
I have a data set with several time assessments for each participant.
I want to select the last assessment for each participant. My dataset
looks
I am using the getQuote function in the Quantmod package to retrieve the %
change for a stock as follows:
> getQuote("aapl",what=yahooQF(c("Change Percent (Real-time)")))
Trade Time %Change (RT)
aapl 2012-10-11 03:41:00 N/A - -1.67%
How can I extract the numeric "change %" which is
HI Sebastian,
Sorry, I found an error in my solution (the values and coefficients got mixed
up in sorting).
Try this:
library(reshape)
extract.plm <- function(model) {
if (!class(model)[1] == "plm") {
stop("Internal error: Incorrect model type! Should be a plm object!")
}
zz1<-summary(model)$coe
On 2012-10-11 12:48, bibek sharma wrote:
Hello R help,
I have a question similar to what is posted by someone before. my
problem is that Instead of last assessment, I want to choose last two.
I have a data set with several time assessments for each participant.
I want to select the last assess
I have already try "optimx" but I got this error message. How to solve it.
fn is Linn
Function has 10 arguments
par[ 1 ]: 0 http://r.789695.n4.nabble.com/optim-and-nlminb-tp4645772p4645907.html
Sent from the R help mailing list archive at Nabble.com.
___
> qs <- getQuote(c("aapl","tibx","gm","badWolf"),what=yahooQF(c("Change Percent
> (Real-time)")))
> qs
Trade Time %Change (RT)
aapl2012-10-11 04:00:00 N/A - -2.00%
tibx2012-10-11 04:00:00 N/A - -0.85%
gm 2012-10-11 04:00:00 N/A - +1.77%
badWolf N/A -
I'm glad I asked as I would have thought that this was a common requirement and
quantmod itself or a simple R function would have done the conversion. You
saved me from having to master R's sub function. One remaining thing…when I use
your snippet for AAPL, I get:
> aapl=getQuote("aapl",what=ya
But I thought the intention was to turn the string into a number, not
into another string.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: arun [mailto:smartpink...@yahoo.com]
> Sent: Thursday, October 11, 2012 1:54 PM
> To: Fuchs Ira
> Cc: R help; Wi
HI,
Try this:
sprintf("%.2f",as.numeric(sub("^.* ([-+]?[[:digit:].]+)%$", "\\1",
as.character(aapl[[2]]
#[1] "-2.00"
A.K.
- Original Message -
From: Fuchs Ira
To: r-help@r-project.org
Cc:
Sent: Thursday, October 11, 2012 4:45 PM
Subject: Re: [R] simple parsing question?
I'm gl
Yes, in my case it would be re-learning regular expressions. Unlike riding a
bicycle, this is something I have managed to forget (except for the simplest
cases). I even have an old O'reilly book on the subject which I can dust off.
I was thinking (hoping?) that quantmod had functions to manipu
On Oct 11, 2012, at 12:48 PM, bibek sharma wrote:
> Hello R help,
> I have a question similar to what is posted by someone before. my
> problem is that Instead of last assessment, I want to choose last two.
>
> I have a data set with several time assessments for each participant.
> I want to sel
Dear Bert--
I tried your function on the data that I provided (data.df) and it worked
beautifully (after I added a missing final parenthesis), producing exactly
the same output as my function. This is an excellent example of what I was
looking for, because it is
(a) 50% shorter than mine,
I hate to decline such praise, but honesty demands that I must.
In fact, my solution is **not** fully vectorized at all! The tapply()
and mapply() calls are, in fact, in some sense hidden loops at the
interpreted levels. They do have the virtue of being true to R's
functional paradigm, but they ar
I wanted to put a certain string in sans serif font in an *.Rd file
that I was writing. I tried {\sf ...} and \textsf{...} but both resulted
in the warning "unknown macro". The manual on "Writing R Extensions"
seems to me to imply that one should be able to invoke such LaTeX
macros (section 2.3)
Hi,
I am using R package "QT" which call runs alongwith SAS
I get this error : " Error in file(file, "rt") : cannot open the
connection"
I have tried using setwd or running R directly from that directory but
still get the same error. Any help would be appreciated
setwd("C:\\Documents and Settin
Hi,
Try this:
dat1<-read.table(text="
Area NAME DATE X Xn Y
1 X 1/10/10 1 1 0
1 Y 1/11/10 0 0 1
1 X 1/12/10 1 0 0
1 X 1/12/10 1 0 0
1 X 1/12/10
Adam,
See the attached R code that solves your problem and beyond. One important
issue is that you are enforcing constraints only indirectly. You need to make
sure that P1, P2, and P3 (which are functions of original parameters and time)
are all between 0 and 1. It is not enough to impose co
Dear R-helpers,
I need to read some data from output of garchFit in fGarch.
my model is garch(1,1) and i want to read
coefficients(omega,alpha,beta) and timeseries(x) and conditional
SD(s). because i need them to use in other formula.
for example :omega+x[1]+s[3]
and maybe i have several simulati
Hi,
Using Vegan package I was wondering if there's a way to use a distance
matrix as an input for adonis (or any of the other similar hypothesis
testing functions) instead of the usual species by sample table.
Working in the field of microbial ecology, what I'm trying to do is to
overcome the p
I've been beating my head on the table for hours now and don't understand why
this doesn't work. I have a dataframe that I want to change NAs to 0 for
some of the columns and not others. Consider this...
>#create dataframe
> A = c(1:5)
> B = c(6, 7, NA, NA, NA)
> C = c(NA, NA, 13, 14, 15)
> D = c(
Hello,
I have to add "Age (bar(x)=14.3) as a title on a chart. I am unable to get
this to working. I have tried bquote, substitute and expression, but they
are only doing a part of the job.
new<-
c(14.3, 18.5, 18.1, 17.7, 18, 15.9, 19.6, 17.3, 17.8, 17.5, 15.4,
16.3, 15, 17.1, 17.1, 16.4, 15.2,
Hi,
I'm going crazy trying to plot a quite simple graph.
i need to plot estimated hazard rate from a cox model.
supposing the model i like this:
coxPhMod=coxph(Surv(TIME, EV) ~ AGE+A+B+strata(C) data=data)
with 4 level for C.
how can i obtain a graph with 4 estimated (better smoothed) hazard curve
Actually what does "only logical matrix subscripts are allowed in
replacement" mean. I can designate columns using is.na.
--
View this message in context:
http://r.789695.n4.nabble.com/Changing-NA-to-0-in-selected-columns-of-a-dataframe-tp4645917p4645918.html
Sent from the R help mailing list a
Thank you! That had me stuck for quite a while and this worked like a charm!
--
View this message in context:
http://r.789695.n4.nabble.com/Formatting-data-for-bootstrapping-for-confidence-intervals-tp4645860p4645920.html
Sent from the R help mailing list archive at Nabble.com.
___
Hi,
Try this:
dat1 = as.data.frame ( cbind ( A, B, C, D, E ) )
dat1$B[is.na(dat1$B)]<-0
dat1$C[is.na(dat1$C)]<-0
dat1
# A B C D E
#1 1 6 0 16 21
#2 2 7 0 17 NA
#3 3 0 13 18 NA
#4 4 0 14 19 NA
#5 5 0 15 20 25
A.K.
- Original Message -
From: scoyoc
To: r-help@r-project.org
Cc:
On Thu, Oct 11, 2012 at 11:58 PM, arun wrote:
> Hi,
> Try this:
> dat1 = as.data.frame ( cbind ( A, B, C, D, E ) )
No. Do not try this. It is a Very Bad Thing to use
as.data.frame(cbind(...))
instead of
data.frame(...)
for reasons I've mentioned before on this list. In short, cbind()
forces
Hello,
What a terribly asked question.
Let me rephrase it. You have a time series 'x' simulated with garchSim
from package fGarch and have fitted a model using garchFit.
1. You want to extract the coefficients.
coef(fit)
2. You want the series of observations (simulated) and of conditional sd.
Hi Michael,
Sorry!
You are right. That was OP's code, which I cut and paste without noticing it.
To Scoyoc:
You can also try this:
dat1 <-data.frame(A, B, C, D, E )
dat1new<-dat1[,2:3]
dat1new[is.na(dat1new)]<-0
dat1[,2:3]<-dat1new
dat1
# A B C D E
#1 1 6 0 16 21
#2 2 7 0 17 NA
#3
I think that bquote, with its .() operator, suffices for [almost?] any single
title;
don't bother fiddling with expression(), substitute(), or parse(). (You can
make
those work in many situations, but if you stick with just bquote then you can
spend your time on the title itself.)
E.g.,
hist
On 12-10-11 6:05 PM, Rolf Turner wrote:
I wanted to put a certain string in sans serif font in an *.Rd file
that I was writing. I tried {\sf ...} and \textsf{...} but both resulted
in the warning "unknown macro". The manual on "Writing R Extensions"
seems to me to imply that one should be able
Below I have written out some simplified data from my dataset. My goal is
to interpolate Price based on timestamp. Therefore the closer a Price is in
time to another price, the more like that price it will be. I want the
interpolations for each St and not across St (St is a factor with levels
A, B
Hello Thomas,
I use both svymean (with the expanded sample = people), and svyratio
(voting unit level), using the same design:
design <-svydesign(id=~station + unit, fpc=~probstation+probunits,
data=sample, pps="brewer")
I got different results using the same sample:
svyratio (voting unit)
Hi,
Could you please advice some easy way to do the following for a dataframe
(header=F) having unequal column- & row- length.
1. Combine/stack/join contents from -
a) multiple rows into one column.
b) multiple columns into one row.
2. Stack contents from multiple col
All --
I have been trying to work with the 'Party' package using R v2.15.1 and have
cobbled together a (somewhat) functioning code from examples on the web. I
need to run a series of unbiased, conditional, cForest tests on several subsets
of data which I have made into a loop. The results ide
Hello,
I am new to R and am trying to complete a mixed conditional logistic
regression. There are two issues that I am currently having:
1. I am not sure how to insert the random effects variable into the
equation. My current equation is
model<-mclogit(Presence~AllWet+AllAg+strata(Pair))
where Pr
Hello,
Try the following.
data[ , 2:3][is.na(data[ , 2:3] ) ] = 0
You have to tell the interpreter which columns you want to change.
Hope this helps,
Rui Barradas
Em 11-10-2012 23:05, scoyoc escreveu:
I've been beating my head on the table for hours now and don't understand why
this doesn't
Hello,
I'm having trouble figuring out how to see resulting groups (clusters)
from my hclust() output. I have a very large matrix of 4371 plots and 29
species, so simply looking at the graph is impossible. There must be a
way to 'print' the results to a table that shows which plots were in
wh
Hi-
I am using the following code:
start=c(alpha=0.4,beta=0.4)
warm.10<-nls(warming$umoles60~alpha*exp(beta*warming$T10cm),start =
start,data=warming,na.action=na.omit)
This code works for other columns in my dataset that are similar to $T10cm
but the code does not work for this particular
Hi
I'm computing the correlation between two time-series x_t and y_t-1
(time-series lagged using the lag(y,-1) function) using the cor() function
and the returned value is different from the value of ccf() function at the
same lag. Any ideas why this is so?
Thanks in advance for any hints.
Message received; thanks.
cheers,
Rolf
On 12/10/12 12:38, Duncan Murdoch wrote:
On 12-10-11 6:05 PM, Rolf Turner wrote:
I wanted to put a certain string in sans serif font in an *.Rd file
that I was writing. I tried {\sf ...} and \textsf{...} but both
resulted
in the warning
1 - 100 of 115 matches
Mail list logo