Thank you Frank!
Now it works perfectly fine.
Regards
Lina
Message: 73
Date: Thu, 23 Jun 2011 14:13:06 -0700 (PDT)
From: Frank Harrell
To: r-help@r-project.org
Subject: Message-ID: <1308863586428-3621045.p...@n4.nabble.com>
Content-Type: text/plain; charset=UTF-8
There is a problem passing x in
I don't know what else to say. Your code looks right to me, and it
all runs. I would check the value of a at each loop:
for (i in 1:4) {
a <- afull[seq(20 * (i - 1) +1, 20 * i), ]
print(a) # so you can see what it is
out[i, ] <- optim(llik, par = start.par, method = "Nelder-Mead")[[1]]
}
Hi:
Here's one take:
shalve <- function(x) {
nc <- sapply(x, nchar)
ns <- nc %/% 2
cbind(a1 = substring(x, 1, ns),
a2 = substring(x, ns + 1, nc))
}
> shalve(a)
a1a2
[1,] "1" "1"
[2,] "1" "2"
[3,] "12" "34"
[4,] "12" "45"
[5,] "124" "567"
[6,] "126" "786"
[7,] "14
I have one last theoretical question, I did not adjust my code prior so that
it maximise the likehood function. I googled that to make optim maximise you
multiply fn by -1.
In my code, would that be the same as saying "-sum" on the "sum" part of my
code (see below)?
llik = function(x)
{
I am sorry if I sound stupid but I am not able to correct the error
even after running this code.
> afull=read.table("D:/hope.txt",header=T)
> llik = function(x)
+ {
+al_j=x[1]; au_j=x[2]; sigma_j=x[3]; b_j=x[4]
+sum(na.rm=T,
+ifelse(a$R_j< 0, log(1/(2*pi*(sigma_j^2)))-
+
Hello,
I having trouble running the CAPdiscrim function located in biodiversityR.
My data tables are as follows:
community data frame (called "spdata")
Species1... Speciesn
site1..
site2..
siten
with abundance data as values. Site names are row names.
and environmental data (ca
How to substring the following vector (in data frame b)
>b
a
11
12
1234
1245
124567
126786
145769
such that:
a1 a2
1 1
1 2
12 23
12 34
124 567
126 787
145 769
I tried logical commands with substr() did not work out.
__
R-help@r
You should just be able to use the sqlQuery function to execute the
query something like this:
con<-odbcConnect(...)
sqlQuery(con,"EXEC ")
On Thu, Jul 7, 2011 at 11:40 AM, Alex Zhang wrote:
> Steven - I use RODBC. Thx,
> - Alex
>
> From: Steven Kennedy
> To: A
On Thu, Jul 7, 2011 at 12:58 PM, Jim Silverton wrote:
> Dear all,
>
> I want to simulate from the null distribution of the following 2 x 3 table,
>
> 2 5 10
> 4 8 5
>
> I am using a chi-squared test.
> Anyone has any idea how to do this?
The r2dtable() function will simulate tables with a
Yes Gabor, you definition (a sequence of numbers which each increase by 1
over the prior
number) is what I meant. Sorry it that was not clear and I thank you and
Joshua for your time and your explanation.
This should work fine.
Gabor Grothendieck wrote:
>
> On Wed, Jul 6, 2011 at 7:32 PM, B
Homework?
If not, context?
-- Bert
On Wed, Jul 6, 2011 at 5:58 PM, Jim Silverton wrote:
> Dear all,
>
> I want to simulate from the null distribution of the following 2 x 3 table,
>
> 2 5 10
> 4 8 5
>
> I am using a chi-squared test.
> Anyone has any idea how to do this?
>
> --
> Thanks
Steven - I use RODBC. Thx,
- Alex
From: Steven Kennedy
To: Alex Zhang
Cc: "r-help@R-project.org"
Sent: Wednesday, July 6, 2011 7:18 PM
Subject: Re: [R] How to Execute A Query Stored In Access 2007
What package are you using to connect to the Access database?
Hi,
Steven i just solved it.
the problem was with RMYSQL, not with the subset.
> dbWriteTable(..., row.names=FALSE) solved my problem...
thanks, sorry for the inconvenience.
2011/7/6 Steven Kennedy
> What function are you using to export your data.frame to MySQL?
>
>
>
> On Wed, Jul 6, 2011
On Wed, Jul 6, 2011 at 7:32 PM, B77S wrote:
> Hi,
>
> How can I discern which elements in x (see below) are in 'order', but more
> specifically.. only the 1st 'ordered run'?
> I would like for it to return elements 1:8... there may be ordered values
> after 1:8, but those are not of interest.
>
>
On Jul 6, 2011, at 8:58 PM, Jim Silverton wrote:
Dear all,
I want to simulate from the null distribution of the following 2 x 3
table,
2 5 10
4 8 5
I am using a chi-squared test.
Yeah. Right. A "chi-squared test". That certainly narrows it down ...
to maybe one quarter of all
Dear all,
I want to simulate from the null distribution of the following 2 x 3 table,
2 5 10
4 8 5
I am using a chi-squared test.
Anyone has any idea how to do this?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
__
R-help@r-p
I seem to recall seeing this done in one or two elegant lines, but
run <- function(x, type = 1) {
index <- rle(diff(c(NA, x)))
i <- cumsum(index$lengths)
j <- match(type, index$values)
x[seq.int(i[j - 1], i[j])]
}
run(c(1, 2, 3, 4, 5, 6, 7, 8, 20, 21, 22, 45))
run(c(20, 22, 24, 26, 1,
Quoting Ouattara :
Dear
I have been trying to a program which requires "nprmpi". However, I have
tried to install the downloaded zip file but get the error: "cannot open
compressed file 'npRmpi_0.40-7.tar.gz/DESCRIPTION'"
Since you didn't tell us any basic information, we have to guess what y
I am an R newbie, and I am facing what is for me a challenging problem. I am
trying to write functions to solve the following problems. It seems as though R
offers so many options I am not sure how to approach the problem.
I have a data frame with dates in the first column and returns in th
well.. the following works, but if you have another idea I am still
interested.
1:(which(diff(x)!=1)[1])
B77S wrote:
>
> Hi,
>
> How can I discern which elements in x (see below) are in 'order', but more
> specifically.. only the 1st 'ordered run'?
> I would like for it to return eleme
Hi,
If an "ordered run" means the difference is between the ith and ith +
1 position is 1, then:
out <- rle(diff(x))
?diff gives you the differences (i + 1) - (i), and then run length
encoding encodes how long a run of the same number is. In this case,
there first run is length 7.
rle() output
Hi,
How can I discern which elements in x (see below) are in 'order', but more
specifically.. only the 1st 'ordered run'?
I would like for it to return elements 1:8... there may be ordered values
after 1:8, but those are not of interest.
x <- c(1, 2, 3, 4, 5, 6, 7, 8, 20, 21, 22, 45)
Thanks fo
What package are you using to connect to the Access database?
On Thu, Jul 7, 2011 at 7:02 AM, Alex Zhang wrote:
> Hey guys,
>
> Could you please teach me how to run or execute a query stored in an Access
> 2007 database?
>
> I can connect and run queries from my Access database without any prob
I have not used BiodiversityGUI.R, but it looks like it needs Rcmdr ... are you
using Rcmdr? In case you are not, here is the url:
http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/
Cheers
David Cross
d.cr...@tcu.edu
www.davidcross.us
On Jul 6, 2011, at 5:37 PM, Aishuijiao wrote:
> Sourced: Biod
Sourced: BiodiversityGUI.R
Error : .onAttach failed in attachNamespace() for 'Rcmdr', details:
call: get(Menus[m, 5])
error: object 'chisquareDistributionPlot' not found
Error in BiodiversityRGUI() : needs Rcmdr
Hi Guys,
I am from China, I wanna use Biodiversity R, but it can't work.
Can so
No, it is not in any package. Feel free to use
it as you wish - it has no licensing restrictions.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
> Sent: Wednesday, July 06, 2011 1:23 PM
> To: William Dun
Has anyone had problems with Rapache that don't show up on command line
execution of R? I just ran into this loading rgdal in Rapache page and having
a problem with loading shared object. The final complaint was that
Stop_XMLParser
was undefined- this was surprising since grep -l showed it in ex
That is what I wanted
Peter Maclean
Department of Economics
UDSM
- Original Message
From: Sarah Goslee
To: Peter Maclean
Cc: r-help@r-project.org
Sent: Wed, July 6, 2011 1:15:31 PM
Subject: Re: [R] Split a row vector into columns
You mean like:
> myvec <- c(1,2,3,1,2,3,1,2,3)
> myv
On Jul 6, 2011, at 4:43 PM, Data Analytics Corp. wrote:
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
Hey guys,
Could you please teach me how to run or execute a query stored in an Access
2007 database?
I can connect and run queries from my Access database without any problem. But
I have an append query stored there. Say called "Append2Tbl". How do I execute
it without copying and pasting the
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
econom
Hi,
within lme(), I think it is only possible to do na.action = na.omit. The
default action (= na.fail) causes lme() to print an error message and
terminate if there are any incomplete observations
Best,
Christine
-
--
Christine Adrion, Dipl.-Stat.,MPH
Ludwig-Maximilians-Universität München
What function are you using to export your data.frame to MySQL?
On Wed, Jul 6, 2011 at 10:41 PM, Thiago Clark wrote:
> Dear R-helpers,
>
> I have a huge dataset and I create a filter selecting only the cases I want
> using:
>>data <- subset(data, data$var=='x' | data$var=='y' | data$var=='z' |
paste on a 'day' since it is trying to convert to something that is ambigous:
> strptime("2011010","%Y%W%w")
[1] "2011-01-02"
> strptime("2011520","%Y%W%w")
[1] "2011-12-25"
> strptime("2011120","%Y%W%w")
[1] "2011-03-20"
> strptime("2011200","%Y%W%w")
[1] "2011-05-15"
On Wed, Jul 6, 2011 at 3:
# Incremental approach
bb <- c(23, 45, 67)
bsp <- barplot(bb,beside=TRUE) # get midpoints of the bars and plot
# draw lines
segments( .7, 50, 1.9, 50)
segments(.7, 50, .7, 48)
segments(1.9, 50, 1.9, 48)
# Or all in one go
segments(c(.7, .7, 1.9), c(50,50,50), c(1.9,.7,1.9), c(50, 48, 48))
---
On Wed, Jul 6, 2011 at 1:37 PM, omernevo wrote:
> Hello,
>
> a probably rather stupid question to which I can't find an answer:
>
> I have a bar chart, and I want to present which bars are significantly
> different by placing a line with an asterisk above then (similarly to fig. 3
I would highly
I'd do it by hand with either segments() or arrows() and text(), but
without a reproducible example I can't give you specific instructions.
Sarah
On Wed, Jul 6, 2011 at 4:37 PM, omernevo wrote:
> Hello,
>
> a probably rather stupid question to which I can't find an answer:
>
> I have a bar chart
Hello all,
I am trying to estimate the cumulative distribution function for a single
stock return time series. A piecewise estimation is composed of three parts:
parametric generalized Pareto (GP) for the lower tail (10% of the
observation), non-parametric kernel-smoothed interior (80% of the
obse
Dear
I have been trying to a program which requires "nprmpi". However, I have
tried to install the downloaded zip file but get the error: "cannot open
compressed file 'npRmpi_0.40-7.tar.gz/DESCRIPTION'"
I tried the command: install.packages("nprmpi") but get the message "package
'nprmpi' is no
> * Sam Steingold [2011-07-05 15:30:02 -0400]:
>
> I want to modify etr.rt (or create a new frame etr.rt.md) which would
> have all the columns of etr.rt plus 5 additional columns
>
> market.cap
> X52.week.low
> X52.week.high
> X3.month.average.daily.volume
> X50.day.moving.average.price
>
> whic
Dear Annemarie,
Can you replicate the problem using a madeup dataset or one of the
ones built into R? It strikes me as odd to pass tree1$edge directly
to lapply, when it is also hardcoded into the function, but I do not
have a sense exactly for what you are doing and without data it is
hard to pl
Dear all,
I did a Kruskall-Wallis test for a comparison of a variable of interest
between 10 sites and I get a significant result (p=0.0019). however, when I
perform a post-hoc test using kruskalmc from the pgirmess package, I get no
difference between any of the paired comparisons. I cannot find
Hello,
a probably rather stupid question to which I can't find an answer:
I have a bar chart, and I want to present which bars are significantly
different by placing a line with an asterisk above then (similarly to fig. 3
in: http://jnm.snmjournals.org/content/46/4/574.figures-only).
Does anyone
Dear R-help subscribers,
I have a quite stupid question about using lapply. I have the following
function:
create.gradient <- function(i){
colorgrad01<-color.scale(seq(0,1,by=0.01), extremes=c("red","blue"))
tree1$edge[i,1] -> x
tree1$edge[i,2] -> y
print(x)
print(y)
all2[x] -> z
all2[y] -> z2
Hi,
I am having a trouble parsing dates using strptime() that I get in the
format of year and week number. The data looks like this "201127" which
means year 2011 and week 27. I would like to graph this using ggplot but
then I get a gap between 201054 and 201101 so I thought I would just easily
co
t(matrix(rep(1:3, 3), nrow=3))
--- On Wed, 7/6/11, Peter Maclean wrote:
> From: Peter Maclean
> Subject: Re: [R] Split a row vector into columns
> To: r-help@r-project.org
> Received: Wednesday, July 6, 2011, 2:06 PM
> I want to create columns from this
> row vector. From:
> x1 x2 x3 x1 x2
Thanks Michael.
It looked like a decent display but it's nice to know what is going on. I has
figured out something to do with milk but that was my total knowledge..
--- On Wed, 7/6/11, Michael Dewey wrote:
> From: Michael Dewey
> Subject: Re: [R] Unusual graph- modified wind rose perhap
Thanks Bill! That is very useful. Is the str.language function in
any package (findFn("str.language") came up empty)? It certainly
helped me, not only to understand this particular problem, but in
trying to wrap my head around language objects (which I only very
poorly grasp) in general.
Josh
In general, if the data frames are all related then it is best to keep them
together in a list like you have. But if you want to change the names of the
component data frames then you can use a loop, or sometimes better use the
lapply function. Here is a basic example:
tmp <- list( df1=data.f
Hi Duncan
Your method works well for my situation when I make only one call to the
database/URL with the login info. Our database is configured like the
first situation (cookies) that you described below. Now, I will need to
make multiple successive calls to get data for different sites in the
Hi:
Here's one way with the reshape package. I converted ref to numeric
and date to character string first. Sometimes these little things
matter...
library(plyr)
library(reshape)
# Modified original data; note the option in the data.frame() statement
id=c("034","034","016","016","016","340","340
At 12:21 04/07/2011, John Kane wrote:
In a OpenOffice.org forum someone was asking if the spreadsheet
could graph this
http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html
I didn't think it could. :)
I don't think I've ever seen exactly this layout. Does anyone know
if there is
Hi,
On Wed, Jul 6, 2011 at 1:18 PM, Cliff Clive wrote:
> Is there a quick and easy way to write data frames side-by-side in a csv file
> with one column separating them?
>
> I could just fill them with empty rows so they all have the same height,
> then cbind them with empty columns in between, b
After importing multiple files to data.frames in R, I want to rename all
their columns and do other operations with them. The data.frame names are
not continuous like 1, 3, 4, 6.
I could not find a way of creating a list of the data.frames and loop this
and ended up putting them into a list first:
Hello,
I am trying to run a linear mixed model using
model.a <- lme(Psstotals ~ Visit, data=caf, random= ~ Visit|Id)
My dataset looks lie the following:
Id Visit Agecorrected Psstotals
1 106 0 19 8
2 106 1 19 9
3
The question was whether you could do this
'in a single line' and the word 'elegant' was in the
subject line. Those two things don't always go together.
You can put semicolons between the statements so they
all can go on one line, but that isn't very elegant.
You could collapse the three assignm
You mean like:
> myvec <- c(1,2,3,1,2,3,1,2,3)
> myvec
[1] 1 2 3 1 2 3 1 2 3
> matrix(myvec, ncol=3, byrow=TRUE)
[,1] [,2] [,3]
[1,]123
[2,]123
[3,]123
>
Or do you actually have more complex requirements?
Sarah
On Wed, Jul 6, 2011 at 2:06 PM, Peter Macle
Is there a quick and easy way to write data frames side-by-side in a csv file
with one column separating them?
I could just fill them with empty rows so they all have the same height,
then cbind them with empty columns in between, but I'm looking for a more
elegant solution, if one exists.
Than
Uwe,
This worked.
Thank you so much,
Audrey
--
View this message in context:
http://r.789695.n4.nabble.com/very-large-pair-plot-tp3634075p3649361.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
htt
I want to create columns from this row vector. From:
x1 x2 x3 x1 x2 x3 x1 x2 x3
1 2 3 1 2 3 1 2 3
to:
x1 x2 x3
1 2 3
1 2 3
1 2 3 Peter Maclean
Department of Economics
UDSM
__
R-help@r-project.org mailing list
https://stat.ethz
Dr. Pfaff:
After using str; can you give an example on data extration (e.g. for
$par.ests and @residuals)
- Original Message
From: "Pfaff, Bernhard Dr."
To: Peter Maclean ; Dr. Bernhard Pfaff
Cc: "r-help@r-project.org"
Sent: Wed, July 6, 2011 8:17:12 AM
Subject: AW: [R] BY GROUP i
On Wed, Jul 6, 2011 at 8:27 AM, Raquel Martinez Garcia
wrote:
> Hi,
>
> I'm running a tutorial ("Meta-analyses of data from two (or more) microarray
> data sets"), which use wgcna package. I have an error in the function
> modulePreservation (it is below).
> I'm using R2.13
> Can you help me? Do
Hi Pete,
Try the reshape function (see ?reshape for documentation). It can be
a bit confusing, but its worth learning if you deal with multiple
observations per unit much. Code inline does what you want (though
you might need a bit of tweaking to get pretty names, etc.
HTH,
Josh
On Wed, Jul 6
Hi,
I'm running a tutorial ("Meta-analyses of data from two (or more) microarray
data sets"), which use wgcna package. I have an error in the function
modulePreservation (it is below).
I'm using R2.13
Can you help me? Do you know, what is happens?
Thanks
Raquel
multiExpr = list(A = list(data
On Fri Feb 18 17:48:11 CET 2011 Jérôme wrote:
> I'm trying to install the hdf5 library into R. The HDF5 package is
> installed in a special directory, distributed accross my cluster:
> /share/apps/HDF5
>
> So i put the args option to the configure command as i read in previous
> post in the list:
I am fitting a series of models using lmer(). I'd like to be able to
manipulate the coefficients generated by ranef() to facilitate comparisons
between models, and I can't figure out how to do it. (This is probably old
news for most of you, but the problem is that although the ranef() output is
in
> Date: Wed, 6 Jul 2011 13:10:14 +0200
> To: r-help@r-project.org
> CC: but...@uci.edu
> Subject: [R] superimposing network graphs
>
> Dear all,
>
> I have a undirected network (g), representing all the sexual relationships
> that ever existed in a model community.
> I also have a directed edg
Hi All
This might be something very trivial but I seem to miss something in the
syntax or logic which makes me keep wandering around the problem without
arriving at a solution.
What I want to do is to simulate a sample data for performing cluster
analysis. I tried to use
x1= mvrnorm(10,rep(0.8,
Hi,
I need to reshape my dataframe from a long format to a wide format.
Unfortunately, I have a continuous date variable which gives me headaches.
Consider the following example:
> id=c("034","034","016","016","016","340","340")
> date=as.Date(c("1997-09-28", "1997-10-06", "1997-11-04", "2000-09-
Hi,
I would like to calculate the RELATIVE euclidean distance. Is there a
function in R which does it ?
(I calculated the abundance of 94 chemical compounds in secretion of
several individuals, and I would like to have the chemical distance
between 2 individuals as expressed by the relative
Yes absolutely, your explanation makes sense. Thanks very much.
rgds
Paul
--
View this message in context:
http://r.789695.n4.nabble.com/clustering-based-on-most-significant-pvalues-does-not-separate-the-groups-tp3644249p3649233.html
Sent from the R help mailing list archive at Nabble.com.
_
Dear R users,
I am trying to estimate a nested logit model that has a constant option in
a degenerate partition. The data set is a conjoint survey where
respondents were asked to answer multiple choice sets. The choice sets
consist of three alternatives (described by four varying attributes) and a
A) ?str
A common mistake by beginners is to fail to import to the appropriate data
type. Learn to confirm your data types.
B) ?dput
Provide reproducible examples. dput is one useful tool for creating such.
C) Sys.setenv(TZ="CEST")
If you can't use ?chron or ?Date, then setting the default timezone
On Wed, Jul 6, 2011 at 10:37 AM, B Laura wrote:
> Hello all!
>
> As beginner I'm struggling for a while with time zones issue and can't find
> a suitable solution.
> I would be grateful for any help.
>
> Dataset imported from excel has a variable transplant.date which has been
> recorded with CET
?"&"
This is basic. Please read "An Intro to R" before posting any more
such questions if you have not already done so.
-- Bert
On Wed, Jul 6, 2011 at 8:35 AM, Jim Maas wrote:
> I have a data.frame "e" and would like to extract the 23rd column, remove
> any NA's and then remove any values >= 30
I have a data.frame "e" and would like to extract the 23rd column,
remove any NA's and then remove any values >= 30. I can do it in steps
such as this but have failed to figure out how to do it in a single line
any suggestions?
first <- e[,23]
second <- first[!is.na(first)]
third <- seco
Hi there,
I'm wondering what Zelig in the following situation (code below) actually does.
Is this considered as a so called regression adjustment after the propensity
score matching?
library(MatchIt)
library(Zelig)
data(lalonde)
re78 represents the outcome variable
1. With Zelig
m.out <- m
On 06/07/2011 10:37 AM, Jannis wrote:
Dear Duncan,
OK, my fault. I did not realize that you only refer to r-devel. I found however
a way for standard R by putting this into the Rd file:
\details{
\if{html}{\out{}}\ifelse{latex}{}{}
}
And saving the figure in inst/doc.
I think that will wor
When try to use install.package I have this error message :
Error in m[, 1L] : incorrect dimensions number
What the matter with my installation ? I run R2.13 on Window 7 32bits.
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
[[alternative HTML version deleted]]
___
[Reposting, since there was problems with encodings the first time around.]
Dear all,
I stumbled upon what appears to be a troublesome issue when sampling from an
ARIMA model (from Rob Hyndman's excellent 'forecast' package) that contains
a seasonal AR component.
Here's how to reproduce the issu
Hello all!
As beginner I'm struggling for a while with time zones issue and can't find
a suitable solution.
I would be grateful for any help.
Dataset imported from excel has a variable transplant.date which has been
recorded with CET time zone.
> subDataset$transplant.date
[1] "2000-01-01 CET"
Dear Duncan,
OK, my fault. I did not realize that you only refer to r-devel. I found however
a way for standard R by putting this into the Rd file:
\details{
\if{html}{\out{}}\ifelse{latex}{}{}
}
And saving the figure in inst/doc.
Now I just need to find a way to get Inlinedocs to pass this
On 06/07/2011 10:03 AM, Jannis wrote:
Thanks for your advice Duncan. In which file should I put the
\figure{}
command? I tried the *.Rd file, but the html files created are without the
figure. Are you sure I only need to include the filename and no path?
Yes, in the .Rd file.
Can't really d
Thanks for your advice Duncan. In which file should I put the
\figure{}
command? I tried the *.Rd file, but the html files created are without the
figure. Are you sure I only need to include the filename and no path?
Jannis
--- Duncan Murdoch schrieb am Mi, 6.7.2011:
> Von: Duncan Murdoch
Dear all,
I have a undirected network (g), representing all the sexual relationships that
ever existed in a model community.
I also have a directed edgelist (e) which is a subset of the edgelist of g. e
represents the transmission pathway of HIV.
Now I would like to superimpose the picture of th
Hi,
I am reading payment data like so
2010-01-01,100.00
2010-01-04,100.00
...
2011-01-01,200.00
2011-01-07,100.00
and plot it aggregated per month like so
library(zoo)
df <- read.csv("daily.csv", colClasses=c(d="Date",s="numeric"))
z <- zoo(df$s, df$d)
z.mo <- aggregate(z, as.yearmon, sum)
barp
Dear R-helpers,
I have a huge dataset and I create a filter selecting only the cases I want
using:
>data <- subset(data, data$var=='x' | data$var=='y' | data$var=='z' | ... )
The problem is, when i check my new data it doen't show a row_names column
but when the data is exported to MYSQL (using R
Hello Peter,
str(rg2)
us quite revealing for this; by() returns a list and hence lapply() can be
employed, e.g.:
lapply(rg2, rlevel.gev, k.blocks = 5)
By the same token, you can extract the relevant bits and pieces and put them
together in a data.frame.
Best,
Bernhard
> -Ursprüngliche N
On 11-07-06 8:47 AM, Jannis wrote:
Dear list members,
is it somehow possible to include figures to the html help pages of individueal
functions (containing for example a plot produced by that function?)
I thought about adding these figures into a 'graphs' subfolder of the package
folder and t
On occasion, as pointed out in an earlier posting, it is efficient to convert
to a matrix and when finished convert back to a data frame. The Hmisc
package's asNumericMatrix and matrix2dataFrame functions assist by
converting character variables to factors if needed, and by holding on to
original
Dear list members,
is it somehow possible to include figures to the html help pages of individueal
functions (containing for example a plot produced by that function?)
I thought about adding these figures into a 'graphs' subfolder of the package
folder and then to somehow insert some sort of ht
On Wed, 2011-07-06 at 12:24 +0200, mathew brown wrote:
> To all in R land,
>
> Here is what I would like to do.
> x = c(1:10)
> y = c(1:10)
> plot(x,y)
> mtext(side=2, line=1.5, expression(""*delta*""^18*"O [permill]"), cex=1,
> adj=0.5)
>
> That's it. Except I would like to replace "permill" wi
On 07/06/2011 04:19 PM, Annemarie Verkerk wrote:
Dear R-help subscribers;
I have a question regarding making gradients in R. I've searched on the
web, but was only able to find functions that make a gradient between
color X and Y, which is not what I want.
I want to 'pick out' individual, small
table(dat$word)
Sent from my iPad
On Jul 6, 2011, at 1:41, Lee Averell wrote:
> I have a data frame with 2 columns, the first is an index of participants and
> the second is a list of words presented to the participant (see below).
>
>> head(dat)
> sword
> 1a pianist
> 1a sweat
> 1a
To all in R land,
Here is what I would like to do.
x = c(1:10)
y = c(1:10)
plot(x,y)
mtext(side=2, line=1.5, expression(""*delta*""^18*"O [permill]"), cex=1,
adj=0.5)
That's it. Except I would like to replace "permill" with the symbol.
Thanks for the help
On Wed, 6 Jul 2011 11:07:55 +0100 (BST
Actually to get exactly what I want I need to add
no.dimnames(AvgDemand )
where
no.dimnames <- function(a) {
## Remove all dimension names from an array for compact printing.
d <- list()
l <- 0
for(i in dim(a)) {
d[[l <- l + 1]] <- rep("", i)
}
di
t-tests and the like test for a difference in mean value, not for
non-overlapping populations or data sets.
The fact that the mean of one data set differs significantly from the mean of
the other does not mean that the ranges of the individual points in each data
set are disjoint.
set.seed(10
Hi,
I am using gogarch from the package "gogarch". i have 13 series. the
univariate model for the one of the series has a statistically insignificant
constant term (garch(1,1)).
so I want to re fit the model assuming the constant term top be zerocan
i use "update" method to do soif not ple
I have a data frame with 2 columns, the first is an index of participants and
the second is a list of words presented to the participant (see below).
> head(dat)
sword
1a pianist
1a sweat
1a carnage
1a nymph
1ahank
1a waist
> tail(dat)
sword
4a package
4a
Dear R-help subscribers;
I have a question regarding making gradients in R. I've searched on the
web, but was only able to find functions that make a gradient between
color X and Y, which is not what I want.
I want to 'pick out' individual, smaller pieces of a gradient based on a
range of nu
1 - 100 of 110 matches
Mail list logo