Tom:
Supposse your Excel file is named "myExcelFile"
Open myExcelFile and SaveAs "myExcelFile.csv" or "myExcelFile.txt"
Then go to the RConsole and type:
#Option # 1
mydata <- read.csv("PathTomyExcelFile.csv",header=T)
mydata
# You should be able to see your dataset in R
# Option # 2
# If you s
Hi: I need some help.
I am ploting a bar graph but I can't adjust my x axis scale
I use this code:
i <- qplot(ForkLength,Number,data=FL,geom="bar")
i + geom_bar(colour="blue",fill="grey65") # too crowded
FL_dat <- ggplot(FL,aes(x=ForkLength,y=Number)) +
geom_bar(colour="green",f
If you do end up using geom="bar", I believe the
> mistake you're making --
> and I see an error message when I try -- is that you are
> using
> scale_x_continuous whereas the X axis is discrete, so you
> should be using
> scale_x_discrete. But then it will ta
gt; Date: Friday, December 26, 2008, 3:31 PM
> Hi Felipe,
>
> It sounds like ForkLength is a factor - what deos str(FL)
> tell you?
> You might also need geom_bar(..., stat =
> "identity") since your data
> are pretabulated.
>
> Hadley
>
> On Fri, Dec 26
Dear all:
Just to make sure I am on the same page as everyone else.
I just got a new computer and had to reinstall MikTex and of course R and
Tinn-R. In order to be able to generate PDF's with Sweave I had to install
notepad++ to tell Sweave where Latex.exe and yap.exe where located under MikTe
NY 13790
> cryanatbinghamtondotedu
> PGP public keys available at
> http://home.stny.rr.com/ryancw/
>
> "If you want to build a ship, don't drum up the
> men to gather wood,
> divide the work and give orders. Instead, teach them to
> yearn for the
> vast and en
reates one.
--- On Wed, 12/31/08, Felipe Carrillo wrote:
> From: Felipe Carrillo
> Subject: Re: [R] finding yap.exe with Sweave
> To: r-h...@stat.math.ethz.ch, "Christopher W. Ryan"
> Date: Wednesday, December 31, 2008, 3:57 PM
> This is what I did:
> Installed R,Tinn-R
Hello:
I am using Sweave to generate a PDF with figures and tables and was wondering
if is possible to carry on table headers and some kind of caption like
'Continued' to the next PDF page when creating long tables.
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
Thanks Duncan, I'll try that with my data.
--- On Wed, 1/7/09, Duncan Mackay wrote:
> From: Duncan Mackay
> Subject: Re: [R] xtable-longtable question
> To: mazatlanmex...@yahoo.com
> Cc: r-help@r-project.org
> Date: Wednesday, January 7, 2009, 1:15 PM
> I use Sweave and longtable but have not
Hi:
Could someone try to run this example? I can't make it work.
## Not run:
\begin{small}
\setlongtables
\begin{longtable}{
<>=
cat(paste(c('c', rep('cc', 34/2-1), 'c'), collapse='@{\hspace{2pt}}'))
@
}
\hline
\endhead
\hline
\endfoot
<>=
library(xtable)
set.seed(2345)
res <- matr
Hi:
I am going through some of the xtable examples and I can't make the one below
work. I need to create a longtable on the fly keeping the column headers for
all the pages and I thought this example could give some ideas on how to do it.
I am using Sweave and xtable to create my tables and gra
Menne
> Subject: Re: [R] longtable example
> To: r-h...@stat.math.ethz.ch
> Date: Thursday, January 8, 2009, 11:32 PM
> Felipe Carrillo yahoo.com>
> writes:
>
> >
> > Could someone try to run this example? I can't
> make it work.
>
> It would be be
rom: Dieter Menne
> Subject: Re: [R] longtable example
> To: r-help@r-project.org
> Date: Friday, January 9, 2009, 10:01 AM
> Felipe Carrillo wrote:
> >
> > This is what I got.
> >
> > \documentclass[11pt]{article}
> > \usepackage{longtable,lscape}
>
Dear all:
Does anybody know about label conflicts between xtable and Hmisc? I found a
couple of e-mails similar to this problem but is not clear to me how to get
around the label problem.
The first table(longtable below) is generated with the latex function from
Hmisc but for some reason when I
As soon as I sent the e-mail I found a solution to the hyperlink problem.
I removed the squared brackets and the number 1 from the line below. I don't
know why I had the number there in the first place.
\pdfbookmark[1]{Contents}{table}
--- On Sat, 1/10/09, Felipe Carrillo wrote:
> From
Hi:
I need help merging rows.
I am trying to merge the 'Month' column using \multirow. For example for the
column 'Week' I want July to be merged into one row(weeks 27,28,29,30) and so
on for the following weeks.
Below, I am creating a PDF using Sweave, MikTex,R-2.8.1 and windows XP to show
an e
e:
> From: Dieter Menne
> Subject: Re: [R] merge table rows (\multirow)
> To: r-h...@stat.math.ethz.ch
> Date: Monday, January 12, 2009, 12:41 AM
> Felipe Carrillo yahoo.com>
> writes:
>
> > I need help merging rows.
> > I am trying to merge the 'M
onday, January 12, 2009, 8:32 AM
> Felipe Carrillo wrote:
> >
> > I am trying to merge the 'Month' column using
> \multirow. For example for
> > the column 'Week' I want July to be merged
> into one row(weeks 27,28,29,30)
> > and so on for the fo
Dear List:
After reading some of the e-mails related to this topic I found one that
converts a ftable to latex nicely.
library(Hmisc)
n=500
sex <- factor(sample(c("m","f"), n, rep=TRUE))
treatment <- factor(sample(c("Drug","Placebo"), n, rep=TRUE))
symptom <- factor(sample( c('H','S','G'), n
HI:
Could someone help me with the seq function? I have a range of values starting
from 1 to 52 but I want seq to start at 27 by=2, but when it reaches 51 start
with with number 1 to 25. is this possible. I can do the basics of seq() but I
can't figure how to do this one. This is how I want my s
;
> > x <- seq(1, 52, 2)
> > x
> [1] 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
> 37 39 41 43
> 45 47 49 51
> > (x + 26) %% 52
> [1] 27 29 31 33 35 37 39 41 43 45 47 49 51 1 3 5 7 9
> 11 13 15 17
> 19 21 23 25
> >
>
>
> On
Hi Hadley: Not sure if you received my email, so I am resending it again.
I have dealt with this before and I can't remember how it got resolved. It is
too much data to reproduce the example below(49.000 records) but all I am after
is trying to get the x axis breaks. I want my x axis to go from 2
I need to plot two graphics just like the example below but for some reason
your example crashes. Using facet_wrap seems to be the cause:
library(ggplot2)
upper <- with(economics, data.frame(date,value = psavert, position = "upper"))
upper
lower <- with(economics, data.frame(date,value = unemplo
Thanks Thierry:
The use of levels is what I needed, thanks for your help.
From: ONKELINX, Thierry
Subject: RE: [R] ggplot seq
To: mazatlanmex...@yahoo.com, r-h...@stat.math.ethz.ch
Date: Friday, January 23, 2009, 3:01 AM
Dear Felipe,
Provide a dummy sample if your dataset is big or
Check the package 'foreign'. It can read data from SPSS,Minitab,SAS,Systat
(sigmaplot is part of Systat) etc. I also use Sigmaplot and an easy workaround
is to convert the sigmaplot file to csv or xls file and then read it into R.
Felipe D. Carrillo
Supervisory Fishery Biologist
Department o
Actually 'levels' works OK by ordering the x axis labels but since I have 52
weeks it gets too crowded.
Here's part of my dataset with a reproducible example.
sampDat <- "Week FryPassage
27 665
28 2232
29 9241
30 28464
31 41049
32 82216
33 230411
34 358541
35 747839
36 459682
37 609567
38 979475
Dear Thierry:
Thanks for the factor/level advice. I was actually reading about it last night
and playing further with my data I was able to make it work with the code below:
options(scipen=3)
bargraph <- qplot(factor(Week,levels=c(27:52,1:26)),FryPassage,
data=WFBar,geom="bar",fill=I("grey65"),c
Jason:
Check Hadley's page, there's a few examples there. Good luck
http://had.co.nz/ggplot2/geom_vline.html
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
--- On Thu, 1/29/09, Jason Rupert wrote:
> From: Jason Ru
Hi Steve:
I upgraded to the same Tinn-R version a few days ago and I didn't have any
problems at all. Just follow the link below for the instructions. Good luck
http://sourceforge.net/forum/forum.php?forum_id=864071
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
Hi Vemuri:
is this what you want?
x <- "oSO4 oNO3 mSO4 mNO3
3.3728 0.2110 1.9517421 1.01883602
0.8249 0.0697 1.5970292 0.11368781
0.2636 0.1004 0.6012445 0.24356332
8.0072 0.3443 6.1016998 3.63207149
13.5079 0.6593 12.4011068 1.55323386
6.1293 0.1989 5.7620926 0.12884845
0.6004
Ian:
It would work if you copy it as a bitmap.
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
--- On Wed, 2/4/09, Ian Fiske wrote:
> From: Ian Fiske
> Subject: [R] ggplot: problem with fill option in stat_smooth(
ats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.8
> > Warning message:
> > packages ‘TinnR’, ‘svSocket’ are not
> available
> > Error in library(TinnR) : there is no package called
> > 'TinnR'
> > >
> >
> >
> > You suggested that I make sure that th
Hi:
I am trying to create a dynamic latex table using \Sexpr{} but it's not
evaluating it. I also tried the example below without Sweave and also fails. I
have also copied the Sweave.sty to my working directory but nothing seems to
work. Do I need to have certain package in order to run \Sexpr{
18
>
> You likely have R2HTML loaded (likely because you are using
> Tinn-R) and that
> causes some difficulties for Sweave that are easily solved
> as described in
> the FAQ.
>
>
>
> Felipe Carrillo wrote:
> >
> > Hi:
> > I am trying to creat
Hi everyone:
It is probably something simple but I can't find anything related to this.
Could someone show me how to format the sum of x. the result is 1 but I
need comma formatted like this: 10,000. Since I am going to be using this
number to be added to another calculation, I want to be ab
te: Friday, February 6, 2009, 12:39 PM
> on 02/06/2009 02:32 PM Felipe Carrillo wrote:
> > Hi everyone: It is probably something simple but I
> can't find
> > anything related to this. Could someone show me how to
> format the sum
> > of x. the result is 1 but I n
Hi everyone:
I did this before with R and I can't remember how.
I got some fish forklength values
FL number
344
353
367
I need to breakdown the FL by the number of fish with the same length
like this:
34 1
34 1
34 1
34 1
35 1
35 1
35 1
36 1
36 1
36 1
36 1
36 1
36 1
36 1
Hi all:
Using the example below, is there a way to add Y axis titles to each graphic
instead of sharing the same title?
library(ggplot2)
RT = matrix(c(814, 500, 424, 394, 967, 574, 472, 446),4,2)
colnames(RT) = c('repetition','alternation')
rownames(RT) = c('7-yrs','11-yrs','15-yrs','21-yrs')
r
What about using geom_vline and geom_hline to draw
borders. I just couldn't find the way to set the
intercept max value for geom_vline and hardcoded it to
5.5
d<- ggplot(mtcars, aes(x=mpg, y=wt)) + geom_point() +
facet_grid(. ~ cyl)+
scale_y_continuous(limits=c(0,NA))+
scale_x_continuous(limits=
Tom:
You can do this with ggplot2. The code below puts 95%
CI,a smooth line and the mean(blue point)on the same
plot.
Felipe
library(ggplot2)
r <- ggplot(ToothGrowth, aes(y=len, x=factor(dose)))
r$background.fill = "cornsilk"
r + geom_boxplot(aes(colour=supp)) +
stat_summary(aes(group=supp)
Dear All:
Using the Excel formula below I am able to estimate
daily variance(Daily VarPD)for PD,but I can't figure
out how to estimate the Weekly variance for PD. Any
hints?
Daily VarPD = (PD * (1 - TD))/TD + VarTD *
((PD*(1-TD)+ PD^2*TD))/TD^3
WK TDVARTD PD Daily Var
Hello all:
Just wondering if I can get advice on what kind of
bootstrapping I should use when using a regression
model to estimate juvenile fish passage data. I use
rotary screw traps to do fish mark-recapture trials
and the efficiency of every trial is added to the
graph generating a different R-s
Hi all:
Can someone advice me on how to hold the residuals
Mean sq value on a string
so it can be used in other calculations.
I was trying something like this:
Msquare<-dfr$Mean sq but fails..Thanks
dfr <- read.table(textConnection("percentQ
Efficiency
1.5650.0125
1.94 0.0213
0.
Hi all:
I have always used SPSS to estimate weekly
covariance based on a linear regression model
but have to hard code the model Std. Error and the
Mean-Square and then execute
one week a the time. I was wondering if someone
could give me an idea on how to estimate
weekly(WK) covariance usi
Hi all:
How can I transpose this dataset from column to row
idweek value
1 5 51
2 6 73
3 7 41
4 8 22
5 9 83
6 10 55
7 11 42
to something like this...
id1 2 3 4 5 6 7
week 5 6 7 8 9 10 11
value 51 73 41
Hi:
Can anyone advice me on how to loop and perform a
calculation through all the columns.
here's my data
xd<-
c(2.2024,2.4216,1.4672,1.4817,1.4957,1.4431,1.5676)
pd<-
c(0.017046,0.018504,0.012157,0.012253,0.012348,0.011997,0.012825)
td<- c(160524,163565,143973,111956,89677,95269,81558)
mydf<-data
--- jim holtman <[EMAIL PROTECTED]> wrote:
> Glad I could help. You might want to post it back
> to R-Help so that
> others can see what was done.
>
> On Sun, Mar 16, 2008 at 6:02 PM, Felipe Carrillo
> <[EMAIL PROTECTED]> wrote:
> > Jim: I owe you man,
Hi Hadley:
I'm practicing writing a document using MikTex but can't make qplot to execute.
It works when using 'plot' though. Is this a normal behaviour?
\documentclass[9pt]{article}
\title{ggplot2 example}
\begin{document}
\maketitle
\section*{Examples of using ggplot2}
The goal is to be ab
Hi all:
I'm trying to create some side by side dynamic graphics on the same page but I
am running into some problems. I am able to create side by side figures only if
I import them into my PDF. see the example bellow:
\documentclass[12pt]{article}
\usepackage{color,cite,graphicx}% to put in axod
Thanks Dieter, I didn't know about 'minipage' but I was actually going to try
par'(mfrow=c(1,2))' this morning. Thanks for your help again.
--- On Sun, 11/2/08, Dieter Menne <[EMAIL PROTECTED]> wrote:
> > I'm trying to create some side by side dynamic
> graphics on the same page but
>
> Than
\setkeys{Gin}{width=8} gets the desired width but shifts the graph to the
right. Is there another latex command to place the graph so that the margins on
left and right of the page are the same? \centering or \begin{center} doesn't
seem to get it right. I have about one inch margin to my right
Hi: Is there a shorter way to color the abstract,sections subsections and page
headings of a document. I am using the code below in my preamble to accomplish
some of it:
[EMAIL PROTECTED],dvips]{color}
\else\usepackage[usenames,dvipsnames]{color}
% and fix pdf colour problems
\IfFileExists{pdfco
Hello: I found a solution to my problem here, I just downloaded mystyle.sty to
the same directory where my latex file resides. Then I included
\usepackage{mystyle} in my preamble and that took care of coloring any section
of the document.
http://www.sci.usq.edu.au/staff/robertsa/LaTeX/ltxfloats.
Here's one way with ggplot2
library(ggplot2)
p <- qplot(mpg, wt, data=mtcars)
vplayout <- function(x, y)
viewport(layout.pos.row=x, layout.pos.col=y)
grid.newpage()
pushViewport(viewport(layout=grid.layout(3,3)))
print(p, vp=vplayout(1,1))
print(p, vp=vplayout(1,2))
print(p, vp=vplayout(1,3))
prin
Hi:
Is there a function that counts the number of days of any given or current year
based on the date?
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
__
R-help@r-project.
Hello all:
Is there a way to create a graph and then hide it or
just make a graph in the background (invisible). Thanks
Felipe D. Carrillo
Fishery Biologist
US Fish & Wildlife Service
Red Bluff, California 96080
__
R-help@r-project.org mailing li
I hope this is the appropriate list for this type of question
Consider the dataset below:I have a column DOC with values from 3 to 101and
those are the values that I want to show on my x axis, howeverI only get 3,
3.1, 3.2 and so on. I tried to change those values with xlim(3, 101) but I
getthe
I hope this is the appropriate list for this type of question
Consider the dataset below:I have a column DOC with values from 3 to 101and
those are the values that I want to show on my x axis, howeverI only get 3,
3.1, 3.2 and so on. I tried to change those values with xlim(3, 101) but I
getthe
Hi;The code below used to work on my older version of gridExtra but doesn't
work with the new version. Could someonegive me a hint on how to translate this
code to the new version of gridExtra code? Thank you beforehand.
p1 <- ggplot(iris,aes(Sepal.Length, Petal.Length, colour=Species)) +
geom_
gt; On Monday, January 9, 2017 1:08 AM, Felipe Carrillo via R-help
> wrote:
>
>
> Hi;The code below used to work on my older version of gridExtra but doesn't
>work with the new version. Could someonegive me a hint on how to translate
>this code to the new version
Like this? theme(legend.position= 'top'
On Thursday, June 17, 2021, 10:52:04 AM PDT, peri He
wrote:
Dear Friends,
I would like to see my legend outside of a ggplot (at the top).
This code is showing the legend inside of a plot:
theme(legend.position=c(0.15,0.97))
But when I changed
Consider the following dataset: I need to replace NAs with "-" but I lose my
numeric formatting fall.estimate <- structure(list(`Salmon` = c("salmon
River", "Ant Creek", "big Creek", "oso River", "linda Creek"), `baseline` =
c(80874.384012, 361.1997, 5012.8311, 638.6912, 402.1044), `ta
nvert everything to character
format intentionally then.
On October 19, 2019 12:44:26 AM PDT, Felipe Carrillo via R-help
wrote:
>Consider the following dataset: I need to replace NAs with "-" but I
>lose my numeric formatting fall.estimate <- structure(list(`Salmon` =
>c("
is for you to indicate what that solution
was so people searching the archives can learn from your question. Was it to
set the kable option?
options(knitr.kable.NA = '-')
On October 19, 2019 12:50:20 PM PDT, Felipe Carrillo
wrote:
>You are correct. I didnt explain well and fail
Josè
Sent from Yahoo Mail on Android
On Mon, Dec 23, 2019 at 12:15 PM, Abby Spurdle wrote:
Hi Jose,Same here, I use tinn-R on a daily basis..thanks for the update and
have a merry christmas
That's awesome.
I used Tinn-R, back in 2006, when I starting learning nontrivial R programming
They can be downladed. I saved two of them to my desktop as pdf earlier.
Sent from Yahoo Mail on Android
On Fri, May 22, 2020 at 10:35 PM, Mark Leeds wrote:
Hi: I'm not sure about the other link that was sent because I didn't try
it but, in the case of the link that I sent,
you can obtain
What about cowplot?
https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html
On Friday, July 24, 2020, 11:51:17 AM PDT, H wrote:
On 07/24/2020 02:03 PM, Jeff Newmiller wrote:
> The set of people interested in helping when you supply a minimal
> reproducible example i
201 - 267 of 267 matches
Mail list logo