[R] Dataframe to word, using R2wd

2010-05-15 Thread Felipe Carrillo
  Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA - Original Message From: Tal Galili tal.gal...@gmail.com To: Jeremy Miles jeremy.mi...@gmail.com Cc: r-help@r-project.org Sent: Sat, May 15, 2010 1:03:12 AM

[R] Dataframe to word, using R2wd

2010-05-15 Thread Felipe Carrillo
Hi: Just adding on to this question...Is it a way to add footnotes to tables with R2wd? I started using this nice package about a month ago and is one of the things that I can't figure out yet..   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife

Re: [R] a question about latex in Hmisc and .dvi file

2010-05-13 Thread Felipe Carrillo
HI: If you don't mind me asking this question about latex: Based on Duncan's comment: The print method for latex objects tries to run latex and then display the resulting .dvi file.  (Or maybe it runs pdflatex and displays the .pdf file). Where in MikTex can I change to pdflatex? everytime I use

Re: [R] a question about latex in Hmisc and .dvi file

2010-05-13 Thread Felipe Carrillo
the latex function?   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA From: RICHARD M. HEIBERGER r...@temple.edu To: Erik Iverson er...@ccbr.umn.edu Cc: Felipe Carrillo mazatlanmex...@yahoo.com; r-help@r-project.org; Charles Dupont

Re: [R] a question about latex in Hmisc and .dvi file

2010-05-13 Thread Felipe Carrillo
...@temple.edu To: Felipe Carrillo mazatlanmex...@yahoo.com Cc: Erik Iverson er...@ccbr.umn.edu; r-help@r-project.org; Charles Dupont charles.dup...@vanderbilt.edu; Frank E Harrell Jr f.harr...@vanderbilt.edu Sent: Thu, May 13, 2010 1:00:43 PM Subject: Re: [R] a question about latex in Hmisc and .dvi file

[R] predicting without a model

2010-05-11 Thread Felipe Carrillo
Hello: I have 5 years of weekly passage data and want to predict fish passage for the following year. I don't have a model to use to predict data for the sixth year. Can I somehow still predict based on these five years? I just want to see on the graph what the predicted year would look like and

Re: [R] predicting without a model

2010-05-11 Thread Felipe Carrillo
: Re: [R] predicting without a model Felipe Carrillo mazatlanmexico at href=http://yahoo.com;yahoo.com writes: ## snip   In the absence of any other information, I would say your best bet would just be to take the weekly average across the previous years.  There are lots of ways to do

[R] cumsum output

2010-05-10 Thread Felipe Carrillo
Hi: Thanks to Dennis and Fernando for your help reordering the levels. Now I have a different issue: I am trying to get the cumulative weekly values using cumsum and it appears to output the wrong values. Here's my dataset: winter -  structure(list(week = c(26L, 27L, 28L, 29L, 30L, 31L, 32L,

Re: [R] cumsum output

2010-05-10 Thread Felipe Carrillo
I realized that after I hit the send button...I was looking at the wrong dataset,Brr   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA From: jim holtman jholt...@gmail.com To: Felipe Carrillo mazatlanmex...@yahoo.com

Re: [R] Question re: interpolation

2010-05-02 Thread Felipe Carrillo
Are you looking for something like this? data - data.frame(first= c(1,2,3,4,5,6,7,8), zehn = c(15,NA,NA,NA,NA,18,NA,25), second = c(4,NA,7,9,NA,10.2,NA,12),     third= c(6,7,NA,NA,10,12,NA,16))   data     library(zoo)     data2 -na.approx(data,na.rm=F)     data2 ?na.approx   Felipe D.

Re: [R] Sweave question

2010-04-29 Thread Felipe Carrillo
Message From: Duncan Murdoch murdoch.dun...@gmail.com To: Felipe Carrillo mazatlanmex...@yahoo.com Cc: r-h...@stat.math.ethz.ch Sent: Thu, April 29, 2010 4:12:58 AM Subject: Re: [R] Sweave question On 28/04/2010 11:31 PM, Felipe Carrillo wrote: Hi: I am using Sweave and texi2dvi

[R] results=hide?

2010-04-28 Thread Felipe Carrillo
Hi: I am using Sweave and texi2dvi to generate a LaTeX document but can't find the way to hide the graphics while the R chunks are being executed. I thought results=hide would do it but that't not the case. If I do: \begin{figure}[h] figA=true,echo=F,fig=T,results=hide= a rnorm(1000) plot(a) @

[R] Sweave question

2010-04-28 Thread Felipe Carrillo
Hi: I am using Sweave and texi2dvi to generate a LaTeX document but can't find the way to hide the graphics while the R chunks are being executed. I thought results=hide would do it but that't not the case. If I do: \begin{figure}[h] figA=true,echo=F,fig=T,results=hide= a rnorm(1000) plot(a) @

[R] replace question mark with a dash

2010-04-25 Thread Felipe Carrillo
Hi: I have the following dataset in R( thanks Gabor for your help) but now the problem is that all the dashes are converted to questions marks (?) I am trying to get the dashes back using: mydf - data.frame(lapply(mydf,function(x) replace(mydf,?(x),-))) but isn't working. I also tried: mydf -

[R] how to lmport this dataframe into R

2010-04-24 Thread Felipe Carrillo
Hi: I need help with a dataframe(see pic attached). is a mix of dates and text. I want to create a table either using latex function from hmisc or xtable. I already know how to do this but the problem is getting the dataframe into R. I don't have a reproducible example but I am hoping that the pic

[R] how to import a dataframe with mixed text and numbers

2010-04-24 Thread Felipe Carrillo
Hi: I need help with a dataframe. is a mix of dates and text. I want to create a table either using latex function from hmisc or xtable. I already know how to do this but the problem is getting the dataframe into R. I don't have a reproducible example . If someone is interested in helping with

Re: [R] data.frame and ddply

2010-04-16 Thread Felipe Carrillo
You can do something like this after the output from opfut opfut - data.frame(opfut$CONTRAT,opfut$POSITION,opfut$SETTLEMENT) names(opfut) - c('CONTRAT','POSITION','SETTLEMENT') opfut   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California,

Re: [R] adding row ID numbers by group

2010-03-02 Thread Felipe Carrillo
Like this? group- c(1,1,1,1,2,2,2,2,2,3,3,3,3,3,3) var2- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) data-data.frame(group, var2) data ddply(data,group,transform,ID=1:length(group))   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA

Re: [R] ggplot2 X axis levels

2010-02-24 Thread Felipe Carrillo
...@menne-biomed.de To: r-help@r-project.org Sent: Sat, February 20, 2010 2:56:14 AM Subject: Re: [R] ggplot2 X axis levels Felipe Carrillo wrote: Hi all: I've done this before with factors but can't figure how to do it with a continuous variable. I am trying to reorder the sequence of my

[R] ggplot2 X axis levels

2010-02-19 Thread Felipe Carrillo
Hi all: I've done this before with factors but can't figure how to do it with a continuous variable. I am trying to reorder the sequence of my weeks along the X axis. I want to start with week 27 to 52 and then 1 to 26. I guess I could use levels along with seq() but doesn't seem to work for me.

Re: [R] how to read this data file into R?

2010-02-03 Thread Felipe Carrillo
That's strange because I was able to read the file into R just fine --- On Tue, 2/2/10, David Winsemius dwinsem...@comcast.net wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] how to read this data file into R? To: Felipe Carrillo mazatlanmex...@yahoo.com Cc: r-help@r

Re: [R] diagnostic plots

2010-02-03 Thread Felipe Carrillo
Or just click on the Enter key to see the following graphic Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA --- On Wed, 2/3/10, jim holtman jholt...@gmail.com wrote: From: jim holtman jholt...@gmail.com Subject:

Re: [R] how to read this data file into R?

2010-02-02 Thread Felipe Carrillo
Convert the file into a csv file( myfile.csv), delete some of the unwanted rows before importing into R. Save the file on your working directory and then import into R: x - read.csv(myfile.csv) # Change column names names(x) - LETTERS[1:ncol(x)];x Change your column names to whatever you want

Re: [R] median of grouped data

2010-01-27 Thread Felipe Carrillo
Like this? d = read.table(textConnection(ID PM adt_01 25.255 adt_01 225.36 adt_01 14.2325 adt_02 15 adt_02 12.3 adt_03 15.2 adt_03 148.3 adt_03 25.5 adt_03 14.25),head=T) d d$PM - as.numeric(d$PM) ddply(d,.(ID),numcolwise(median)) Felipe D. Carrillo Supervisory Fishery Biologist

Re: [R] simple data manipulation question

2009-12-10 Thread Felipe Carrillo
Or like this: d = data.frame(gender=c(m,f,unkown), x=rnorm(300)) ddply(d,gender,summarise,mean=mean(x)) Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA --- On Thu, 12/10/09, smu m...@z107.de wrote: From: smu

Re: [R] yeroon.net/ggplot2 web application v0.11

2009-12-07 Thread Felipe Carrillo
Hi Jeroen: This is great for someone who is point and click oriented. Can this program be downloaded to be used offline or its just web based? My field crew usually take toughbooks to the field and since they don't know how to program it will be nice to make the graphics just by pointing and

[R] ggplot2-caption on graphics

2009-10-29 Thread Felipe Carrillo
Hi: I am trying to add some caption at the bottom of the graphic by using the 'xlab' and just adding a new line to it. Is there another way to do this or this is the correct way? Thanks library(ggplot2) library(effects) df - data.frame( x = c(3, 1, 5), y = c(2, 4, 6), label = c(a,b,c) )

Re: [R] RODBC sqlSave does not append the records to a DB2 table

2009-10-17 Thread Felipe Carrillo
Elaine: Try this. It works for me using my own database. Perhaps you don't have admin rights. Good luck library(RODBC) myDB - odbcConnectAccess(DB2.mdb,uid=admin,pwd=) sqlSave(myDB,se2,rownames=FALSE,append=TRUE) close(myDB) Felipe D. Carrillo Supervisory Fishery Biologist

Re: [R] two graphs 1 x-axis

2009-10-16 Thread Felipe Carrillo
You can use ggplot2. library(ggplot2) a-c(1,2,3,4,5,6) b-c(3,5,4,6,1,1) c-c(1,1,1,1,1,1) dframe = data.frame(a,b,c);dframe melt.dframe - melt(dframe, id= a);melt.dframe qplot(a,value,data=melt.dframe) + facet_grid(variable~.,scales=free) Felipe D. Carrillo Supervisory Fishery Biologist

Re: [R] change order of bar plot categories

2009-10-14 Thread Felipe Carrillo
Is this what you want? temp-c(rep(Low,2),rep(Medium,2),rep(High,2)) light-rep(c(Dark,light),3) avg-dat.avg2[,3] # se-dat.avg2[,4] dat.avg.temp-data.frame(cbind(avg,se)) dat.avg.temp-data.frame(cbind(temp,light,dat.avg.temp)) dat.plot-qplot(light,avg, fill=factor(temp),data=dat.avg.temp, geom=bar,

Re: [R] Placing text in a ggplot

2009-10-10 Thread Felipe Carrillo
John: The 'year' dataset has 366 rows, I used the 'line.count' without the '1' to come up with 12 rows to match the mlabs and then used line.count to draw the labels. Is this close to what you want? line.count - c(cumsum(as.vector((table(year$monthnum);line.count namposts -

Re: [R] Apply R in Excel through RExcel

2009-10-05 Thread Felipe Carrillo
ryusuke: It sounds like you need to have (D)COM server to be able to work on the background. As for the foreground, rcom is what you need and it appears to be working OK. I am out of my office right now but I'll back to work next week and I will be able to explain in more detail how the

Re: [R] How to download from github

2009-09-25 Thread Felipe Carrillo
...@sharpsteen.net wrote: From: Charlie Sharpsteen ch...@sharpsteen.net Subject: Re: [R] How to download from github To: Felipe Carrillo mazatlanmex...@yahoo.com Cc: r-help@r-project.org Date: Thursday, September 24, 2009, 9:06 PM Hmm, clicking on the 'Download' button and then on either the 'TAR

Re: [R] How to download from github

2009-09-25 Thread Felipe Carrillo
Henrique: It worked nicely, I am using IE 6.0. Thanks a lot for your help --- On Fri, 9/25/09, Henrique Dallazuanna www...@gmail.com wrote: From: Henrique Dallazuanna www...@gmail.com Subject: Re: [R] How to download from github To: Felipe Carrillo mazatlanmex...@yahoo.com Cc: Charlie

[R] How to download from github

2009-09-24 Thread Felipe Carrillo
Hi: Is my first attempt to try to download from github. Nothing happens by clicking on the 'download' button. Could anyone give me a hint on how to get all the files from the link below? Thanks http://github.com/hadley/ggplot2-bayarea/tree/0a8bf71dea38cfbf2d928eb713d24dfd928359fc Felipe

Re: [R] Reading a data frame from R to excel

2009-09-15 Thread Felipe Carrillo
I use sep=\t for Excel files and sep=, for csv files. # Save to Excel write.table(objectname, file = C:/Documents andSettings/Desktop/myfile.xls,sep=\t) Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA --- On Tue,

Re: [R] bar chart with means - using ggplot

2009-09-11 Thread Felipe Carrillo
Like this? # example using qplot library(ggplot2) meanprice - tapply(diamonds$price, diamonds$cut, mean);meanprice cut - factor(levels(diamonds$cut), levels = levels(diamonds$cut)) qplot(cut, meanprice, geom=bar, stat=identity, fill = I(grey50)) dev.new() # create a new graph to compare with

Re: [R] ggplot2: mixing colour and linetype in geom_line

2009-09-09 Thread Felipe Carrillo
Is this what you want? x - structure(list(Temp = c(25.9765, 26.57025, 27.164, 27.7565, 28.34892, 28.94142, 29.53125, 30.12233, 30.71483, 31.30983, 31.90233, 32.49475, 33.08458, 33.67575, 34.26558, 34.85933, 35.45183, 36.04683, 36.63933, 37.23042, 37.82417, 38.414), X22 = c(4.62e-12, 4.73e-12,

Re: [R] ggplot and RExcel

2009-08-18 Thread Felipe Carrillo
Hi Elaine: I developed an application that includes MS Access,RExcel and R. It is all automated, RExcel conects to MS Access in the background and imports custom data, after performing some calculations, RExcel sends the data to R to perform further calculations and then R returns the final

Re: [R] How do I plot a line followed by two forecast points?

2009-08-08 Thread Felipe Carrillo
Try this, it plots two points ahead based on the existing data of a month apart. # Sample dates xValues - seq.Date(as.Date(1990-01-31), to=as.Date(1992-12-31), by=month) # Sample y value yValues - seq(0.1, length=length(xValues)) mydf - data.frame(xValues,yValues);mydf mydf[,1]

[R] ggplot2-ddply question

2009-08-07 Thread Felipe Carrillo
Hi all: I am trying to use the ddply function to estimate the mean of 'Total','Fry','Smolt' and 'Fry.Eq' columns without success. I have the dput of my dataset below. I wonder if someone can give me a hand with this function. # dput(winter) winter -structure(list(IDDate = structure(c(37L, 48L,

Re: [R] ggplot2-ddply question

2009-08-07 Thread Felipe Carrillo
On Aug 7, 2009, at 3:36 PM, Felipe Carrillo wrote: Hi all: I am trying to use the ddply function to estimate the mean of 'Total','Fry','Smolt' and 'Fry.Eq' columns without success. I have the dput of my dataset below. I wonder if someone can give me a hand with this function

Re: [R] making scatter plot points fill semi-transparent

2009-08-06 Thread Felipe Carrillo
You can also use ggplot2: library(ggplot2) x - rnorm(1);y - rnorm(x);myplot - data.frame(x,y) qplot(x,y,data= myplot,colour=I(alpha(blue,1/25))) Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA --- On Wed,

Re: [R] USGS stream flow data automatic download R

2009-07-30 Thread Felipe Carrillo
An Excel Web query will also do what you want. From an Excel Workbook create a web query and link it to the USGS website. You can schedule downloads or the query will download data up-to-date everytime the workbook is open. Felipe D. Carrillo Supervisory Fishery Biologist Department of

Re: [R] Scatter Plot

2009-07-30 Thread Felipe Carrillo
Tri this for both, points and text.. library(ggplot2) qplot(x=1:5,y=1:5) + geom_text(label=1:5) Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA --- On Thu, 7/30/09, amna khan amnakhan...@gmail.com wrote: From:

Re: [R] GGPlot 2 and odfweave

2009-07-24 Thread Felipe Carrillo
Hi John: Use print before qplot or ggplot. Something like this: TV,fig=TRUE,echo=FALSE= print(qplot(subscriber,data=TV09,geom=bar,fill=subscriber, xlab=NULL,ylab=NULL)+coord_flip()+ opts(legend.position=none)) @ Felipe D. Carrillo  Supervisory Fishery Biologist  Department of the

[R] Can I Compile R with MS Access 2003 Developer Extensions?

2009-05-31 Thread Felipe Carrillo
Hi: I have an application that uses MS Access as front end interacting with Excel,Word,Sigmaplot and R in the background. I use the programs to do different tasks but I mainly use R to create graphics on my Access forms without having to manually open R. To make this short, I was wondering if

[R] Can I Compile R with MS Access 2003 Developer Extensions?

2009-05-31 Thread Felipe Carrillo
Hi: I have an application that uses MS Access as front end interacting with Excel,Word,Sigmaplot and R in the background. I use the programs to do different tasks but I mainly use R to create graphics on my Access forms without having to manually open R. To make this short, I was wondering if

[R] ggplot2 legend

2009-05-28 Thread Felipe Carrillo
Hi: I need some help with the legend. I got 14 samples(Muestreo) and I am trying to plot a smooth line for each sample. I am able to accomplish that but the problem is that the legend only displays every other sample. How can I force the legend to show all of my Muestreos? Thanks in

Re: [R] ggplot2 legend

2009-05-28 Thread Felipe Carrillo
Thanks for your help Mike, it works like a charm now!! --- On Thu, 5/28/09, Mike Lawrence mike.lawre...@dal.ca wrote: From: Mike Lawrence mike.lawre...@dal.ca Subject: Re: [R] ggplot2 legend To: Felipe Carrillo mazatlanmex...@yahoo.com Cc: r-h...@stat.math.ethz.ch Date: Thursday, May 28

[R] sqlSave()

2009-05-09 Thread Felipe Carrillo
Hi all: I have created a MS Access table named 'PredictedValues' through the statement below: myDB - odbcConnectAccess(C:/Documents and Settings/Owner/Desktop/Rpond Farming.mdb,uid=admin,pwd=) sqlSave(myDB,PredictedValues,rownames=FALSE) close(myDB) But if I run the code again with

[R] sqlSave()

2009-05-09 Thread Felipe Carrillo
Sorry, I'am resending it because I forgot to send my system info(below) Hi all: I have created a MS Access table named 'PredictedValues' through the statement below: myDB - odbcConnectAccess(C:/Documents and Settings/Owner/Desktop/Rpond Farming.mdb,uid=admin,pwd=)

[R] odbcConnectAccess in Access sub

2009-04-30 Thread Felipe Carrillo
HI: Is it possible to use the RODBC package within MS Access. I have been using from R but was just wondering if it could be used along with R(D)COM. Something like this: Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim myApp As StatConnector Set myApp = New StatConnector

[R] odbcConnectAccess function

2009-04-30 Thread Felipe Carrillo
HI: Is it possible to use the RODBC package within MS Access. I have been using from R but was just wondering if it could be used along with R(D)COM. Something like this: Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim myApp As StatConnector Set myApp = New StatConnector

Re: [R] odbcConnectAccess function

2009-04-30 Thread Felipe Carrillo
Felipe Carrillo mazatlanmex...@y ahoo.com To Sent by: r-h

[R] RODBC inside MS Access Sub

2009-04-29 Thread Felipe Carrillo
HI: Is it possible to use the RODBC package within MS Access. I have been using from R but was just wondering if it could be used along with R(D)COM. Something like this: Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim myApp As StatConnector Set myApp = New StatConnector

Re: [R] Mischief on legend when size=1 added to geom_line

2009-04-17 Thread Felipe Carrillo
Hi Arthur: # Just move size outside 'aes' like this: p - ggplot(df1, aes(Year, PctProf, group = Group)) p + geom_line(aes(color = Group),size=1) # to make the background white just use the black and white theme: p - ggplot(df1, aes(Year, PctProf, group = Group)) p + geom_line(aes(color =

[R] extract values from summary

2009-04-06 Thread Felipe Carrillo
Hi: # How can I extract the 'Forecasts' from the 'summary(predicted)' from the example below? library(forecast) weightData - data.frame(weight = c(2.1,2.4,2.8,3.6,4.1,5.2,6.3),week= 1:7) weight - as.numeric(weightData$weight) predicted - forecast(weight,h=3,level=95) # see the predicted

[R] predicting values into the future

2009-04-05 Thread Felipe Carrillo
Hi: I have usually used the GROWTH() excel function to do this but now want to see if I can do this with R. I want to predict values into the future, possibly with the predict.arima Function. I have the following weekly fish weight averages: weight - c(2.1,2.4,2.8,3.6,4.1,5.2,6.3) week -

Re: [R] predicting values into the future

2009-04-05 Thread Felipe Carrillo
-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Felipe Carrillo Sent: Sunday, 5 April 2009 4:13 PM To: r-h...@stat.math.ethz.ch Subject: [R] predicting values into the future Hi: I have usually used the GROWTH() excel function to do this but now want to see if I can do

Re: [R] predicting values into the future

2009-04-05 Thread Felipe Carrillo
Thank you Bill and Gabor: I do have a few years of fish sizes data (from larvae to juvenile). If I melt them together how can I create the best model to predict future weights. My weeks go up to 16 right now, but I want to predict weights for week 17 to 20. Based on both of you examples it was

Re: [R] help with ggplot2 -- ggpoint function missing?

2009-04-02 Thread Felipe Carrillo
Did you load the package after installing it? install.packages(ggplot2) library(ggplot2) Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA --- On Wed, 4/1/09, haettulegur haettule...@gmail.com wrote: From:

Re: [R] ggplot2-geom_text()

2009-03-30 Thread Felipe Carrillo
...@yahoo.com Cc: r-h...@stat.math.ethz.ch Date: Monday, March 30, 2009, 2:46 PM Hi Felipe Carrillo wrote: Hi: I need help with geom_text(). I would like to count the number of Locations and put the sum of it right above each bar. x - Location Lake_dens Fish Pred Lake1

Re: [R] two monitors

2009-03-30 Thread Felipe Carrillo
Hi: I use two monitors and I didn't have to do nothing to do what you want done. Try to print an R graph then drag it to the second screen. If that doesn't work, you may need to go to your settings and identify screen one and screen two from the dialog box. Good luck Felipe D. Carrillo

[R] ggplot2 Y axis labels

2009-02-18 Thread Felipe Carrillo
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] function question

2009-02-11 Thread Felipe Carrillo
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

[R] format \Sexpr{}

2009-02-06 Thread Felipe Carrillo
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

Re: [R] format \Sexpr{}

2009-02-06 Thread Felipe Carrillo
...@stat.math.ethz.ch Date: 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 need comma

Re: [R] Sweave and \Sexpr{}

2009-02-05 Thread Felipe Carrillo
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 create a dynamic latex table using \Sexpr{} but it's not evaluating

Re: [R] ggplot: problem with fill option in stat_smooth()

2009-02-04 Thread Felipe Carrillo
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 ianfi...@gmail.com wrote: From: Ian Fiske ianfi...@gmail.com Subject: [R] ggplot:

Re: [R] Upgrading to TINN - R 2.1.1.6

2009-02-04 Thread Felipe Carrillo
to determine this Any other suggestions ? Thanks Steve Friedman Ph. D. Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 steve_fried...@nps.gov Office (305) 224 - 4282 Fax (305) 224 - 4147 Felipe

[R] Sweave and \Sexpr{}

2009-02-04 Thread Felipe Carrillo
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

Re: [R] Upgrading to TINN - R 2.1.1.6

2009-02-02 Thread Felipe Carrillo
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

Re: [R] Boxplots by variable

2009-02-02 Thread Felipe Carrillo
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

Re: [R] Adding vertical line to histogram and qplot stacked plot

2009-01-29 Thread Felipe Carrillo
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 jasonkrup...@yahoo.com

Re: [R] ggplot seq

2009-01-24 Thread Felipe Carrillo
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,

Re: [R] ggplot seq

2009-01-23 Thread Felipe Carrillo
Thanks Thierry: The use of levels is what I needed, thanks for your help. From: ONKELINX, Thierry thierry.onkel...@inbo.be 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

Re: [R] Is it possible for R to import a SigmaPlot file?

2009-01-23 Thread Felipe Carrillo
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

Re: [R] ggplot seq

2009-01-23 Thread Felipe Carrillo
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

[R] ggplot seq

2009-01-22 Thread Felipe Carrillo
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

[R] ggplot2 example

2009-01-22 Thread Felipe Carrillo
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 =

[R] seq()

2009-01-21 Thread Felipe Carrillo
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

Re: [R] seq()

2009-01-21 Thread Felipe Carrillo
want: 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 Wed, Jan 21, 2009 at 12:29 PM, Felipe Carrillo mazatlanmex

[R] ftable to latex

2009-01-13 Thread Felipe Carrillo
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,TRUE)) #

[R] merge table rows (\multirow)

2009-01-12 Thread Felipe Carrillo
...@menne-biomed.de wrote: From: Dieter Menne dieter.me...@menne-biomed.de Subject: Re: [R] merge table rows (\multirow) To: r-h...@stat.math.ethz.ch Date: Monday, January 12, 2009, 12:41 AM Felipe Carrillo mazatlanmexico at yahoo.com writes: I need help merging rows. I am trying to merge

Re: [R] merge table rows (\multirow)

2009-01-12 Thread Felipe Carrillo
) To: r-help@r-project.org Date: Monday, 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 following weeks. Below, I am

[R] merge table rows (\multirow)

2009-01-11 Thread Felipe Carrillo
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

[R] Hmisc-xtable label

2009-01-10 Thread Felipe Carrillo
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

Re: [R] Hmisc-xtable label (Solved)

2009-01-10 Thread Felipe Carrillo
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 mazatlanmex

Re: [R] longtable example

2009-01-09 Thread Felipe Carrillo
example To: r-h...@stat.math.ethz.ch Date: Thursday, January 8, 2009, 11:32 PM Felipe Carrillo mazatlanmexico at yahoo.com writes: Could someone try to run this example? I can't make it work. It would be better if you would show a complete sample; the error could be in the header part

Re: [R] longtable example

2009-01-09 Thread Felipe Carrillo
: Dieter Menne dieter.me...@menne-biomed.de 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} \usepackage{accents} \usepackage

Re: [R] xtable-longtable question

2009-01-08 Thread Felipe Carrillo
Thanks Duncan, I'll try that with my data. --- On Wed, 1/7/09, Duncan Mackay mac...@northnet.com.au wrote: From: Duncan Mackay mac...@northnet.com.au 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

[R] longtable example

2009-01-08 Thread Felipe Carrillo
Hi: Could someone try to run this example? I can't make it work. ## Not run: \begin{small} \setlongtables \begin{longtable}{ results=tex,fig=FALSE= cat(paste(c('c', rep('cc', 34/2-1), 'c'), collapse='@{\hspace{2pt}}')) @ } \hline \endhead \hline \endfoot results=tex,fig=FALSE=

[R] help

2009-01-08 Thread Felipe Carrillo
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

[R] xtable-longtable question

2009-01-07 Thread Felipe Carrillo
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

Re: [R] finding yap.exe with Sweave

2009-01-01 Thread Felipe Carrillo
. --- On Wed, 12/31/08, Felipe Carrillo mazatlanmex...@yahoo.com wrote: From: Felipe Carrillo mazatlanmex...@yahoo.com Subject: Re: [R] finding yap.exe with Sweave To: r-h...@stat.math.ethz.ch, Christopher W. Ryan cr...@binghamton.edu Date: Wednesday, December 31, 2008, 3:57 PM This is what I did

[R] finding yap.exe with Sweave

2008-12-31 Thread Felipe Carrillo
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

Re: [R] ggplot2 Xlim

2008-12-26 Thread Felipe Carrillo
should be using scale_x_discrete. But then it will take some R magic to combine your bins into wider bins so you get a less crowded look. Or perhaps I'm misunderstanding? Wayne Felipe Carrillo wrote: Hi: I need some help. I am ploting a bar graph but I can't adjust my x

Re: [R] ggplot2 Xlim

2008-12-26 Thread Felipe Carrillo
...@mac.com 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, 2008 at 2:44 PM, Felipe Carrillo mazatlanmex

[R] Count days of current year

2008-11-25 Thread Felipe Carrillo
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 __

<    1   2   3   >