similar to: save to file

Displaying 20 results from an estimated 1000 matches similar to: "save to file"

2011 Apr 03
1
another question on shapefiles and geom_point in ggplot2
Manuel: I changed your variable names from x to 'long' and y to 'lat' on the riqueza_out.csv file. The code below should do what you want. Also, since the legend title is kind of long, I broke it down into three lines so you can see more plot area. I am cc'ing the other groups so more people use it if needed. library(rgdal) library(ggplot2) library(sp) library(maptools)
2012 Nov 12
3
arrange data
Dear r-users,   I have daily rainfall data from 1971 to 2000.  I would like to extract november and december data only.  I would also like to do column bind for november and december, therefore I would like to delete 31 December from december data so that the length of november and december are the same.  Hope somebody can help me.  I tried this below:   > kuantan.dt.1 <-
2012 Jul 12
2
nls question
 Hi:  Using nls how can I increase the numbers of iterations to go beyond 50.  I just want to be able to predict for the last two weeks of the year.  This is what I have:  weight_random <- runif(50,1,24)  weight <- sort(weight_random);weight weightData <- data.frame(weight,week=1:50)                          weightData plot(weight ~ week, weightData) M_model <- nls(weight ~ alpha +
2012 Dec 02
4
simple subset question
 Hi, Consider the small dataset below, I want to subset by two variables in one line but it wont work...it works though if I subset separately. I have to be missing something obvious that I did not realize before while using subset.. fish <- structure(list(IDWeek = c(27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L,
2011 Jan 25
1
ggplot - controlling point size
Can anyone illuminate the following for me? How can I get rid of the blue line in the key in the second plot? ## Create a simple data frame df=data.frame(x=1:1000, y=2*1:1000+rnorm(1000,sd=1000), type=sample(letters[1:2],1000, replace=TRUE)) ## Very nice! Almost what I want qplot(x, y, data=df, colour=factor(type)) + geom_smooth() ## Make a nicer plot, with smaller points ## but why
2011 Feb 13
1
Changes titles in ggplot2 plot
Dear Colleagues, In the following simple ggplot2 code: -------------------------------- m <- ggplot(d.fig, aes(time, prob)) m + stat_summary(fun.data = "median_hilow", conf.int = .95, geom = "smooth") + facet_wrap(~ Cohort, nrow=1) + coord_cartesian(ylim = c(0, .03)) -------------------------------- Is there a way to replace the y-axis label from "prob" to
2012 Oct 25
2
mean of a value of the last 2 hours
Hello, I have a data frame somewhat like that: myframe <- data.frame (ID=c("Ernie", "Ernie", "Ernie", "Bert", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012 11:00"), Hunger=c(1,1,1,2,2,1) ) myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
2013 May 03
1
print multiple plots to jpeg, one lattice and one ggplot2
hello everybody, I want to print two plots in one png file, I tried several options but i didn't succeed the first plot (bwplot) print to the defined position, but the second (ggplot) doesn't Any idea? Thanks a lot Christophe # Example: #------------------------------------- library(ggplot2) library(lattice) library(grid) one <- bwplot(decrease ~ treatment, OrchardSprays, groups
2011 May 17
4
Summarize by two or more attributes
Okay everyone heres a likely softball for someone. Consider the following data frame: #Create data x<-rep(c(1,15),10) y<-rnorm(20) z<-c(rep("auto",10),rep("bus",10)) a<-rep(c(1,1,2,2,3,3,4,4,5,5),2) #Create Data frame Df<-data.frame(Source=x,Rate=y,Bin=a,Type=z) I want to create a new column the equals the sum of the Rates for each type (1,15) by Bin. A
2011 Nov 01
3
factor level issue after subsetting
Dear list, I cannot figure out why, after sub-setting my data, that particular item which I don't want to plot is still in the newly created subset (please see example below). R somehow remembers what was in the original data set. A work around is exporting and importing the new subset. Then it's all fine; but I don't like this idea and was wondering what am I missing here? Thanks!
2011 Dec 04
3
Group several variables and apply a function to the group
Dear R-experts, I am struggling with the following problem, and I am looking for advice from more experienced R-users: I have a data frame with 2 identifying variables (comn and mi), and an output variable (x). comn is a variable for a company and mi is a variable for a month. comn<-c("abc", "abc", "abc", "abc", "abc", "abc",
2011 Apr 01
4
Rexcel path problem
Hi, I am running a test to call an R script with in excel using VBA. My VBA code is shown bellow. The middle section of this mail also includes the content of my Rscript. The bottom part shows the error message form the R console. It seems that Excel is opening the R console without any problems. The problem I am seeing is that Rinterface.RRun instruction is interpreting the "\T"
2012 Feb 14
1
txtStart creates a NULL file
Hello all: I'm trying to use the following code to get commands, comments and results to a .txt file. It only appears to capture comments. When I comment those out with #, it creates a NULL file. Someone seemed to have a similar problem with a mac GUI (https://stat.ethz.ch/pipermail/r-help/2010-September/253177.html) but the result seemed to be ambiguous. Is there a work-around?
2008 Mar 22
2
counting values on one colum only
Hi all: Can someone help me count the number of rows with values in colum "a" only. assume the name of my dataframe is "weekly" I was trying i<- nrows(weekly$a) i but returns 7 when it should be 4. Thanks a b c d 27.000 27.000 1.569 0.013 160.000 27.000 1.632 0.013 146.000 27.000 1.830 0.015 70.000 27.000 2.475 0.019
2009 Jan 21
4
seq()
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 sequence to look like: 27 29 31 33 35 37 ............51 1 3 5 7 9 11 13 ...........25 Felipe D.
2010 Jul 24
2
How to generate a sequence of dates without hardcoding the year
Hi: I have a dataframe named 'spring' and I am trying to add a new variable named 'IdDate' This line of code works fine: spring$idDate <- seq(as.Date("2008-07-01"),as.Date("2009-06-30"),by="week") But I don't want to hardcode the year because it will be used again the following year Is it possible to just generate dates with the month and
2008 Aug 10
2
detect if data is normal or skewed (without a boxplot)
Hello all: Is there a way to detect in R if a dataset is normally distributed or skewed without graphically seeing it? The reason I want to be able to do this is because I have developed and application with Visual Basic where Word,Access and Excel "talk" to each other and I want to integrate R to this application to estimate confidence intervals on fish sizes (mm). I basically want to
2008 Oct 11
6
Sweave-LaTEX question
Hi: I am working on a publication and I have heard about LaTEX but I haven't actually tried to learn about it until today. I've found a few examples but I can't actually make them work properly. I have a couple of questions: Does LATEX have to be installed on your computer? How does the xtable package and Sweave work together? How can I make the code below create a table as pdf file?
2009 Apr 30
1
odbcConnectAccess function
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 myApp.GetErrorText myApp.Init "R" myApp.EvaluateNoReturn "library(RODBC)" myApp.EvaluateNoReturn
2010 Nov 29
2
drop levels problem
Hi all: I am having trouble dropping levels, got a few hints online?without success. Please consider the dataset below: ?I was under the inpression that subset(......drop=TRUE) would work but it doesn't library(ggplot2) ??? library(hmisc) x <- structure(list(first = c(38.2086, 43.1768, 43.146, 41.8044, 42.4232, 46.3646, 38.0813, 40.0745, 40.4889, 38.6246, 40.2826, 41.6056, 34.5353,