I've got a problem with mcmcsamp used with glmer objects produced
with lmer from the lme4 package.
When calling mcmcsamp, I get the error
Error in if (var(y) == 0) { : missing value where TRUE/FALSE needed
This does not occur with all models, but I can't find anything wrong
with the
Duncan Murdoch a écrit :
On 23/01/2008 7:37 PM, [EMAIL PROTECTED] wrote:
Hi all,
I am trying to write a pdf manual for my package. I create a file
inst\doc\myDoc.tex. I taught that R CMD build will call latex on this
file (like
it is said in Writing R extension), but it does not happen.
Hallo,
I just made a boxplot with the following command:
boxplot(vsnrg$M~col(vsnrg$M))
When I now look at the plot. On the x-axis I just find numbers 1-6
because I have 6 datasets plotted. Now I want to add there the
corresponding names which can be found in colnames(qrg). How can I
realize this
hello,
happy new year.
I want to know if it's possible to send a bar chart from the software R to an
directory.
Thanks.
_
[[alternative HTML version deleted]]
Hallo,
how can I store a variable as a tab-delimited txt-file? I crated a
variable with the following commands:
fit12-lmFit(qrg[,1:2])
t12-toptable(fit12,adjust=fdr,number=25,genelist=qrg$genes[,1])
t12
ID logFC t P.Value adj.P.ValB
522PLAU_OP
Hey does anyone know how to do t.test for beta1 and beta0, which are the slope
and intercept of the linear regression
Thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
See ?write.table
On 24/01/2008, Schmitt, Corinna [EMAIL PROTECTED] wrote:
Hallo,
how can I store a variable as a tab-delimited txt-file? I crated a
variable with the following commands:
fit12-lmFit(qrg[,1:2])
t12-toptable(fit12,adjust=fdr,number=25,genelist=qrg$genes[,1])
t12
Hi,
I want to know if it's possible to send a bar chart from the
software R to an directory.
Do you mean saving your figure to a file ? If so, you can take a look
at the device functions, which allow you to generate your figure to a
file in different formats, especially pdf or postscript.
For
Hi,
Now I want to store t12 as a tab-delimited txt-file to use it in other
programm. How can I realize this?
Did you take a look at the write.table() function ? You can supply
«\t» as «sep» argument to get a tab-delimited file.
Hope that helps,
Julien
--
Julien Barnier
Groupe de recherche
Try this:
boxplot(vsnrg$M~col(vsnrg$M), xaxt=n)
axis(1, at=1:length(colnames(qrg)), labels=colnames(qrg))
On 24/01/2008, Schmitt, Corinna [EMAIL PROTECTED] wrote:
Hallo,
I just made a boxplot with the following command:
boxplot(vsnrg$M~col(vsnrg$M))
When I now look at the plot. On the
Try this:
#some data
y1=rnorm(1:3)
y2=rnorm(1:3)
#draw two plots on the same screen
par(mfrow=c(2,1),oma = c(6, 0, 5, 0))
par(mar=c(0, 5.1, 0, 5.1))
plot(y1,xaxt=n,type=n) #1st plot
par(mar=c(0, 5.1, 0, 5.1))
plot(y2,xaxt=n,type=n) #2nd plot
#try to draw lines onto each plot on the screen
hello,
to display my histogram from a png file to a html file I use this syntax
myplot2 - png(file=file.path(directory,myplot2.png), bg=transparent)
plot(1:10)
rect(1, 5, 3, 7, col=white)
dev.off()
png:C:/Documents and Settings/melyakhlifi/Bureau/myplot.png
On Thu, 24 Jan 2008, elyakhlifi mustapha wrote:
hello,
to display my histogram from a png file to a html file I use this syntax
myplot2 - png(file=file.path(directory,myplot2.png), bg=transparent)
Please re-read ?png: myplot2 will be NULL.
plot(1:10)
rect(1, 5, 3, 7, col=white)
dev.off()
Thanks Henrique!
On 1/24/08, Henrique Dallazuanna [EMAIL PROTECTED] wrote:
Try this:
#some data
y1=rnorm(1:3)
y2=rnorm(1:3)
#draw two plots on the same screen
par(mfrow=c(2,1),oma = c(6, 0, 5, 0))
par(mar=c(0, 5.1, 0, 5.1))
plot(y1,xaxt=n,type=n) #1st plot
par(mar=c(0, 5.1, 0, 5.1))
Hallo Julien,
thanks for the hint. It works now.
Corinna
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Julien Barnier
Sent: Thursday, January 24, 2008 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: [R] store variable as tab-del. txt-file
Hi,
Now
christophe.genolini wrote:
Duncan Murdoch a écrit :
On 23/01/2008 7:37 PM, [EMAIL PROTECTED] wrote:
Hi all,
I am trying to write a pdf manual for my package. I create a file
inst\doc\myDoc.tex. I taught that R CMD build will call latex on this
file (like
it is said in Writing R
Hi,
I have R 2.5.1 installed in my system and have installed rcom package
1.5-2.2 vesion. I don't see the following reference RCOM 1.0 Type
Library in the VBA IDE. Please help. Also, after installing when I type
comRegisterRegistry(), it return NULL. Is that ok? Same with
comRegisterServer().
I have a time series of rainfall in a dataframe. I would like to be
able to aggregate this using a sliding window approach- i.e. a new 24
hourly total is calculated for each hours rainfall. I'm struggling to
understand how this might be achieved - currently I've tried looping a
sum function to
Dear R users,
I would like to know where I'm wrong doing the following.
lmList(Rail) is working fine, since it gives back the ouput.
But on
intervals(lmList(Rail))
I'm getting the following error
Errore in out[, est., ] - coeff[, Estimate, ] :
numero di indici non corretto
that translated
Hi,
I have sucessfully plotted the graph by using the following command:
ec-rep(0,length(e))
fc-rep(0,length(f))
plot(e,ec,type=p,col=1,pch=19)
points(f,fc,col=2,pch=20)
legend(1.0e+08,1.0,c(dog, human),text.col=green4,pch=c(19,20),col=c(1,2))
Below are the values for e and
This is a little far afield but I will be back with R/analysis
questions as things progress:
I am working with a dissolve oxygen signal, so there is defiantly
seasonality, There are local changes in mean and variability (with a
graphical investigation on the order of around seven days). I am
Charles C. Berry wrote:
On Wed, 23 Jan 2008, Kevin E. Thorpe wrote:
Frank E Harrell Jr wrote:
Charles C. Berry wrote:
On Wed, 23 Jan 2008, Frank E Harrell Jr wrote:
Kevin E. Thorpe wrote:
Kevin E. Thorpe wrote:
Gabor Grothendieck wrote:
It eliminates Hmisc and R by giving you a tex
Hi All,
There is something I don't quite understand about R memory management.
I have the following function
function (AdGroupId)
{
print(memory.size())
channel - odbcConnect(RDsn, uid = , case = tolower, pwd =
xx)
Tree1 - sqlQuery(channel, exec SelectAdgroups
Kevin E. Thorpe wrote:
Charles C. Berry wrote:
On Wed, 23 Jan 2008, Kevin E. Thorpe wrote:
Frank E Harrell Jr wrote:
Charles C. Berry wrote:
On Wed, 23 Jan 2008, Frank E Harrell Jr wrote:
Kevin E. Thorpe wrote:
Kevin E. Thorpe wrote:
Gabor Grothendieck wrote:
It eliminates Hmisc and R
Dear R users,
Just a quick question, how do I prevent 10 printed as 1e+05 when I
print it into a file?
Thanks,
Alex
Alex C. Lam
Roslin Institute (Edinburgh)
Midlothian
EH25 9PS
United Kingdom
Tel: +44 131 5274471
Roslin Institute is a company
Dear Contributors:
I have the next vector:
Z
z = (526, 0.1, 110, 0.2, 34, 0.4, 614, 0.5, 1, 14, 15)
I want to generate a vector containing the values higher than 1
corresponding to the z vector, wich in this case will mean to generate the
next vector:
(526, 110, 34, 614, 14, 15)
If you
Hi, there is following issue, which I encounter when doing data analysis. Say
we have data in form of the matrix x:
x
[,1] [,2] [,3]
[1,] 0.14 10
[2,] 0.25 11
[3,] 0.15 12
[4,] 0.16 13
[5,] 0.24 14
[6,] 0.35 16
now I want to do surface plot of
Dear R users
since R 2.6.0 when I try to save a graph from the Rgraphic device I find
that
the system becomes so slow that I'm forced to kill the process.
This usually does not happen at the beginning of the session.
The problem seems to arise when the system opens the dialog
window to choose
Hi
I have some density estimates obtained from density(). I would like to
calculate the sum of squares of these. As the x values of the estimates
are not the same, and I would prefer not to restrict the estiomate to a
certain range of x values, how can I do the calculation?
Lets say:
d1 -
On 24/01/2008 8:59 AM, threshold wrote:
Hi, there is following issue, which I encounter when doing data analysis. Say
we have data in form of the matrix x:
x
[,1] [,2] [,3]
[1,] 0.14 10
[2,] 0.25 11
[3,] 0.15 12
[4,] 0.16 13
[5,] 0.24 14
[6,]
z[z 1]
regards,
Albert
Am Donnerstag, den 24.01.2008, 10:54 -0300 schrieb Juan Pablo Fededa:
Dear Contributors:
I have the next vector:
Z
z = (526, 0.1, 110, 0.2, 34, 0.4, 614, 0.5, 1, 14, 15)
I want to generate a vector containing the values higher than 1
corresponding to the
On Thu, 24 Jan 2008, Martin Eklund wrote:
Dear R users,
I'm wondering about the singular.ok option in lm. If singular.ok is
set to TRUE does it mean that we allow the generalized inverse of
(X'X)^-1 (where X are the independent variables and ' denotes the
transpose)? Or is the singularity
On 24/01/2008 9:00 AM, Giovanni Maria Marchetti wrote:
Dear R users
since R 2.6.0 when I try to save a graph from the Rgraphic device I find
that
the system becomes so slow that I'm forced to kill the process.
This usually does not happen at the beginning of the session.
The problem seems
--
X-USF-Spam-Status: hits=-2.5 tests=BAYES_00,FORGED_RCVD_HELO
X-USF-Spam-Flag: NO
Armin Goralczyk,
I am working with FreeBSD 8.0-CURRENT, R-2.6.1 and lattice() installs fine.
I think you have to update your FreeBSD ports tree. Afterwards you can
install R-2.6.0. The newest version R-2.6.1 is
Dear Contributors:
I have two vectors x and z, and I want to display the histograms of both
vectors in the same graph, x in red bars, z in blue bars.
If you have any clue on how to do that, I will be very glad to hear it!!
Thanks in advance again,
Juan Pablo Fededa
[[alternative
Bill Meeker's programs for reliability analysis can fit this, they are part of
his SPLIDA package for Splus. I'm not sure that anyone has ported these to R
however.
The survreg routine does not handle this case, and psm call survreg to do the
actual work.
Terry Therneau
Hi,
Is there on R a package containing Maximum entropy spectral analysis
function?
Thanks in advance,
Nuno Prista
__
Instituto de Oceanografia - FCUL, Portugal
Center for Quantitative Fisheries Ecology - ODU, USA
Hello,
I am comparing 2 nonlinear models one with a correlation structure.
I used the gnls command in the nlme package to fit model 1 and then the
update(mod1,corr=corExp(form=~lat+lon,nugget=T) to fit the same model but with
a correlation structure. I am comparing models using AIC, but I am
Dear everybody,
I still didn't manage to install the RSvgDevice-Package. Please, note
the attached file: The server cannot seriousely be the problem. I would
be glad if you could find the mistake.
Thank you in advance.
Yours,
Mag. Ferri Leberl
Am Sonntag, den 20.01.2008, 18:29 + schrieb
That's an easy one with ggplot2.
library(ggplot2)
dataset - data.frame(variable = gl(2, 50, labels = c(x, z)), value
= c(runif(50), rnorm(50)))
ggplot(data = dataset, aes(x = value, fill = variable)) +
geom_histogram(position = dodge) + scale_fill_manual(values = c(red,
blue), guide = tile)
But
Hi
Are you sure this is an R problem? The Choose dialog can be very slow
if you have networked directories that cannot be connected to. Windows
tries to connect repeatedly and each time waits for a timeout. Suggest
you check your mapped network drives.
Regards
JS
---
Dear R users
since
On 1/24/2008 9:43 AM, Juan Pablo Fededa wrote:
Dear Contributors:
I have two vectors x and z, and I want to display the histograms of both
vectors in the same graph, x in red bars, z in blue bars.
If you have any clue on how to do that, I will be very glad to hear it!!
It's hard to
There is either something wrong with either me or is Yacas/Ryacas doing odd
things. See below I ask to simpify an expression and the there's output! If
this is a simplification.. well.. Do you think there is something set wrong
somewhere. Thanks.
library(Ryacas)
Loading required package: XML
Rainer M Krug [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Hi
I have some density estimates obtained from density(). I would like
to calculate the sum of squares of these. As the x values of the
estimates are not the same, and I would prefer not to restrict the
estiomate to a
Here is another approach that may or may not be easier:
library(TeachingDemos)
x - 0:4
y - 0:20
z - matrix( runif(80), ncol=20 )
image(x,y,z)
clipplot( image(x,y,z, col=heat.colors(12), add=TRUE), xlim=c(0,1) )
clipplot( image(x,y,z, col=terrain.colors(12), add=TRUE), xlim=c(1,2)
)
Hi All,
I can get the barplot function to do many types of plots, stacked or
otherwise. However, I cannot get it to do a *single* stacked bar. I've
searched several books listserv archives to no avail. I suspect I'm
missing the obvious from the help file!
I can reach my goal in ggplot2,
Use summary on the fitted lm object, i.e.:
fit - lm(y ~ x, data=mydata)
summary(fit)
And the t-tests will be printed (along with a bunch of other stuff).
You can also save the results of summary if you want to use the t-values
and p-values for something else.
Hope this helps,
--
Gregory
Hi,
I'm looking for a script to translate TAF/METAR code into comprehensive text
that I can include in a R-script (METAR is the international standard code
format for hourly surface weather observations).
I haven't seen anything in the libraries.
Do you think such a thing exists for R ?
Thanks
Look at the examples for cnvrt.coords in the TeachingDemos package, they
might give you some ideas to accomplish what you want.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL
Muenchen, Robert A (Bob) wrote:
Hi All,
I can get the barplot function to do many types of plots, stacked or
otherwise. However, I cannot get it to do a *single* stacked bar. I've
searched several books listserv archives to no avail. I suspect I'm
missing the obvious from the help file!
Specify xlim and ylim in the plot function to set the limits on the x/y
axis. See ?plot.default for details.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
This code opens a CSV file from the working directory set by wd. I copy
2 or more columns in the spreadsheet and then close it. What I need
help with is setting the first row as the column names in
clipboardTextAsDF. There is probably a simple or better way to do this
but I have been away
There is more than one way, but probably the easiest is to set
options(scipen= some big number). See ?options for details.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From:
On Jan 18, 2008, at 5:57 PM, Hesen Peng wrote:
Hi,
I recompiled R using gfortran in my personal laptop. But I think it
may help if you build an agent C program which calls the FORTRAN
program, and then call the C program from R.
I'm also curious on how to solve this problem without too
On 1/23/08, Spilak,Jacqueline [Edm] [EMAIL PROTECTED] wrote:
Hi everyone
I am using barchart to make my graphs. Here is my code.
barchart(percent_below ~ factor(Year)| factor(Season,
levels=unique(Season)),
data= .season_occurrence, origin = 0, layout = c(4, 1),
Marc Eric,
Thanks so much for the help. That is exactly what I was looking for.
I should have mentioned that I don't really like this plot, but I'm
writing an explanation of the Grammar of Graphics concept. A very nice
example of that is that a single stacked bar chart converts to a pie
chart
I suspect you have ignored
'If you are using an old version of R and think it does not work
properly, upgrade to the latest version and try that, before posting.'
(from the posting guide). You didn't tell us your R version (as we asked
in the posting guide) and so we have assumed it was
I am a new user of Crimson editor and was hoping that someone could help me
to integrate Crimson Editor to run programs in R. I have tried the
following and I receive an error message stating Argument Ignored.
Command: C:\Program Files\R\R-2.6.0\bin\Rgui.exe
Argument: $(FileName) $(FileDir)
Hi,
i'm very new to R, so sorry for what i'm sure is a very basic question. I'm
producing a boxplot with the data below:
df3-data.frame(
x=c(10,11,115,12,13,14,16,17,18,21,22,23,24,26,27,28,29,3,30,32,33,34,35,4,4
1,45,5,50,52,56,58,6,67,6738,68,7,8,9),
hi,
iam working with cpa method ade4 and want to simulate with this mehod is it
possible and how ?
thank you
-
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Nuno Prista nmprista at fc.ul.pt writes:
Is there on R a package containing Maximum entropy spectral analysis
function?
Burg and Yule-Walker are in spec.ar(stats)
Dieter
__
R-help@r-project.org mailing list
Dear group,
I have a data.frame (d1) with various elements and a
matrix (m1) created with NA (or 1s). I want to read
each row,column in d1 and fill its numeric value in
m1.
Could some one help me because I have 130K rows and
500 column data.frame object and I was told that a for
loop will take a
.
I also have an issue on the Mac getting latex(describe(iris)) to work.
I get the .tex file but this error:
latex(describe(iris))
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%-line parsing enabled.
entering extended mode
Try this:
d1 - data.frame(d1)
d1$V3 - as.numeric(as.character(d1$V3))
xtabs(V3 ~ r1+c1, data=d1)
You can substitute 0 with NA:
d1.tb - xtabs(V3 ~ r1+c1, data=d1)
d1.tb[d1.tb==0] - NA
On 24/01/2008, Srinivas Iyyer [EMAIL PROTECTED] wrote:
Dear group,
I have a data.frame (d1) with various
Dear Henrique,
thanks for the tip.
One question though: how do I get back a matrix out of
d1.tb.
d1.tb is an xtabs object.
I tried:
myres - ftable(d1.tb)
myre1 - as.data.frame(myres)
now myres1 is nor a matrix or a df.
I want d1.tb as a matrix.
Please suggest.
thanks
srini
--- Henrique
I'm just learning how to use R right now, so I'm not sure what the most
efficient way to organize these data is.
I had subjects perform the same task twice with slight changes between the
rounds. I want to analyze differences between the rounds. All of the
subjects also answered a questionnaire.
Dear list,
i'm trying to test if a linear combination of coefficients of glm is equal
to 0. For example :
class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to
test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means for each
level.
for me, the question is how to
Hello Members,
I wonder if someone also having a problem with JRI using new R 2.6.1.
To illustrate the problem, there is a simple Java driver problem
below. The program runs just fine on the other computer with R 2.5.1,
but does not run with R 2.6.1. It gives me no error messages either.
Needles
Try this:
x$survey1[x$count==0] - 0
x$survey1[x$count %in% 1:11] - 1
x$survey1[x$count 11] - 2
x.wide - reshape(x, v.names=survey1, idvar=location,
timevar=survey1, direction=wide)
x.wide - x.wide[order(x.wide$location),]
x.wide$var1 - tapply(x$var1, x$location, mean)
x.wide
On 24/01/2008,
Perhaps this helps:
myres - d1.tb[]
attributes(myres)$call - NULL
myres
class(myres)
If you want remove 'c1' and 'r1' then:
names(dimnames(myres)) - NULL
class(myres)
On 24/01/2008, Srinivas Iyyer [EMAIL PROTECTED] wrote:
Dear Henrique,
thanks for the tip.
One question though: how do I
Putting all the information in one row is going to be
the easest for data entry and for analysis.
If it's easier you can enter the task information in
one data set and the questionnaire in another (with
the same unique id ) and merge the data sets later if
you need to.
All you want is the data
Hi everyone,
I'm running the following command:
step(mydata.glm,directions=both,trace=T)
which returns the model with the lowest AIC.
Now I'd like to get the list of all the models (or at least the formulas)
that were used in between.
I've noticed the keep option, but couldnt find any help on
Here is how I would do it (there are multiple ways you could do it, so
there is not single Right answer):
Assign each person a unique identifier.
Put all the information from the questionaire along with the idenifier
and anything else that does not change between rounds (age, sex, height,
...)
On Thu, 24 Jan 2008, peter salzman wrote:
Dear list,
i'm trying to test if a linear combination of coefficients of glm is equal
to 0. For example :
class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to
test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means
On Thu, 24 Jan 2008, Sylvain Bertrand wrote:
Hi everyone,
I'm running the following command:
step(mydata.glm,directions=both,trace=T)
which returns the model with the lowest AIC.
Now I'd like to get the list of all the models (or at least the formulas)
that were used in between.
I've
Hi folks. This set of code used to work, but after upgrading to the
latest version of Rmetrics it no longer does. Any ideas?
SP500-read.table(SP500.csv,header=TRUE,sep=,)
head(SP500)
DateOpenHigh Low Close Volume Close2
1 8/4/2006 1280.26 1292.92 1273.82
All,
I'm trying to obtain a one-liner to generate a certain sequence of
alternatign numbers.
Consider:
unlist(rep(list(c(1,2), c(3,4)), each = 6))
[1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4
I'd like the result to be as above but continue until 38. Of course, I
could hardcode this
thank you,
peter
On 1/24/08, Prof Brian Ripley [EMAIL PROTECTED] wrote:
On Thu, 24 Jan 2008, peter salzman wrote:
Dear list,
i'm trying to test if a linear combination of coefficients of glm is
equal
to 0. For example :
class 'cl' has 3 levels (1,2,3) and 'y' is a response variable.
This ??
as.vector( outer(0:1, rep(seq(1,37,by=2), each=6), + ) )
On Thu, 24 Jan 2008, David Afshartous wrote:
All,
I'm trying to obtain a one-liner to generate a certain sequence of
alternatign numbers.
Consider:
unlist(rep(list(c(1,2), c(3,4)), each = 6))
[1] 1 2 1 2 1 2 1 2 1 2
SP500$Date - as.character(as.Date(as.character(SP500$Date), %m/%d/%y))
SP500-as.timeSeries(SP500)
On 24/01/2008, Kerpel, John [EMAIL PROTECTED] wrote:
Hi folks. This set of code used to work, but after upgrading to the
latest version of Rmetrics it no longer does. Any ideas?
On Thu, Jan 24, 2008 at 03:03:22PM -0500, David Afshartous wrote:
All,
I'm trying to obtain a one-liner to generate a certain sequence of
alternatign numbers.
Consider:
unlist(rep(list(c(1,2), c(3,4)), each = 6))
[1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4
I'd like the
Duncan Murdoch wrote:
On 1/24/2008 9:43 AM, Juan Pablo Fededa wrote:
Dear Contributors:
I have two vectors x and z, and I want to display the histograms of both
vectors in the same graph, x in red bars, z in blue bars.
If you have any clue on how to do that, I will be very glad to hear
But look what happens to the date field:
SP500-read.table(SP500.csv,header=TRUE,sep=,)
head(SP500)
DateOpenHigh Low Close Volume Close2
1 8/4/2006 1280.26 1292.92 1273.82 1279.40 2530970112 1279.40
2 8/3/2006 1278.22 1283.96 1271.25 1280.27 2728440064 1280.27
3
Yes, in the previous email that I send to you i comment this:
you need the %Y
SP500$Date - as.character(as.Date(as.character(SP500$Date), %m/%d/%Y))
On 24/01/2008, Kerpel, John [EMAIL PROTECTED] wrote:
But look what happens to the date field:
SP500-read.table(SP500.csv,header=TRUE,sep=,)
Here are a couple of options (I'm sure there are plenty of others) that
replicate your results and can be extended without too much more typing
(but some arithmatic):
unname(unlist( rep( as.data.frame( matrix(1:4, nrow=2) ) , each=6 ) ))
[1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4
On Thu, 24 Jan 2008, peter salzman wrote:
Dear list,
i'm trying to test if a linear combination of coefficients of glm is equal
to 0. For example :
class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to
test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means
The last one can be shortened to:
c(aperm(array(1:4, c(2,2,6)),c(1,3,2)))
[1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4 3 4
And it extends to 38 fairly easily:
c(aperm(array(1:38, c(2,38/2,6)),c(1,3,2)))
[1] 1 2 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3 4 3 4 3 4
3 4 5
[26]
Hi
[EMAIL PROTECTED] napsal dne 24.01.2008 18:20:41:
Hi,
i'm very new to R, so sorry for what i'm sure is a very basic
question. I'm
producing a boxplot with the data below:
df3-data.frame(
x=c(10,11,115,12,13,14,16,17,18,21,22,23,24,26,27,28,29,3,30,32,33,34,35,4,4
round(12.01,1) will give the answer 12, not 12.0 or even 12. To make a
table look nice, I need to display the trailing zero so that just as
round(12.05,1) yields 12.1, round(12.01) yields 12.0. I cannot find an
answer in print() or format() or options(). Any suggestions would be
appreciated.
formatC(round(12.01), digits=1, format=f)
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lucke, Joseph F
Sent: Thursday, January 24, 2008 4:37 PM
To: r-help@r-project.org
Subject: [R] Displaying trailing zeroes
round(12.01,1) will
Try this:
x$survey1[x$count==0] - 0
x$survey1[x$count %in% 1:11] - 1
x$survey1[x$count 11] - 2
x.wide - reshape(x, v.names=survey1, idvar=location,
timevar=survey1, direction=wide)
x.wide - x.wide[order(x.wide$location),]
x.wide$var1 - tapply(x$var1, x$location, mean)
x.wide
x$survey1[x$count==0] - 0
x$survey1[x$count %in% 1:11] - 1
x$survey1[x$count 11] - 2
x.wide - reshape(x, v.names=survey1, idvar=location,
timevar=survey1, direction=wide)
x.wide - x.wide[order(x.wide$location),]
x.wide$var1 - tapply(x$var1, x$location, mean)
x.wide
Thanks a lot
I need to group some subjects according to two
variables (var1, var2)
I have a data frame that looks something like this:
Subject var1 var2
1 400150
2 320100
3 580600
4 145789
Each suject would fall into one of
On 24/01/2008 4:36 PM, Lucke, Joseph F wrote:
round(12.01,1) will give the answer 12, not 12.0 or even 12.
Those are all the same number. You aren't asking about the answer, you
are asking about how to control how the number is printed.
To make a
table look nice, I need to display the
Don MacQueen wrote:
Nobody seems to have asked whether the student is using R from the Mac
GUI, or R at the unix-style command line prompt.
I have R 2.6.1 installed on a Mac running OS 10.4.11. When I start R at
the command prompt in a terminal emulator in the X windows environment,
the
Hi Peter,
Thank you for the quick answer.
Given that we have UNIX system available here in Geoscience Australia, I am
wondering if UNIX is also faster and with 64 bit build. Perhaps they may be
kind enough to let me have a Linux system.
As I only have experience in using Windows PC, what kind of
Lucke, Joseph F wrote:
round(12.01,1) will give the answer 12, not 12.0 or even 12. To make a
table look nice, I need to display the trailing zero so that just as
round(12.05,1) yields 12.1, round(12.01) yields 12.0. I cannot find an
answer in print() or format() or options(). Any
Hi Everybody,
I need to install the R-package 'foreign'. However, when I try the
standard install.packages('foreign') I get the following error
message:
package 'foreign' is not available in: install.packages(foreign)
The funny thing is, that I am using an Ubuntu Gutsy system and the
foreign
By accident, I didn't send this to the list.
On Thu, 2008-01-24 at 17:54 -0500, Thomas Levine wrote:
Oh, right, I don't need the differences. I only needed to get the
differences before because I was doing them sloppily in a spreadsheet
and needed to do a t-test manually because the program
I can reach my goal in ggplot2, although the relative heights of the
bar's pieces don't seem quite right (it does generate a warning):
library(ggplot2)
x-factor(1)
y-factor( c(Male,Male,Female) )
mydata - data.frame(x,y)
rm(x,y)
mydata
Ooops! There was a bug in stat_bin that occurred
1 - 100 of 118 matches
Mail list logo