How do I set the limits of my x and y axis in svyplot? xlim and ylim does not work. Regards, Raphael [[alternative HTML version deleted]]
Raphael I just ran an example from the help file, and the xlim argument worked fine. Can you post a small example where the xlim argument doesn't work? Jean library(survey) data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) svyplot(api00~api99, design=dstrat, style="bubble") svyplot(api00~api99, design=dstrat, style="bubble", xlim=c(500, 700)) On Thu, Nov 20, 2014 at 12:54 AM, Raphael Fraser <raphael.fraser at gmail.com> wrote:> How do I set the limits of my x and y axis in svyplot? xlim and ylim does > not work. > > Regards, > Raphael > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Does not work when ,style="grayhex". library(survey) data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) svyplot(api00~api99, design=dstrat, style="grayhex") svyplot(api00~api99, design=dstrat, style="grayhex", ylim=c(500, 700)) On Thu, Nov 20, 2014 at 9:19 AM, Adams, Jean <jvadams at usgs.gov> wrote:> Raphael > > I just ran an example from the help file, and the xlim argument worked > fine. Can you post a small example where the xlim argument doesn't work? > > Jean > > library(survey) > data(api) > dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, > fpc=~fpc) > svyplot(api00~api99, design=dstrat, style="bubble") > svyplot(api00~api99, design=dstrat, style="bubble", xlim=c(500, 700)) > > > On Thu, Nov 20, 2014 at 12:54 AM, Raphael Fraser <raphael.fraser at gmail.com > > wrote: > >> How do I set the limits of my x and y axis in svyplot? xlim and ylim does >> not work. >> >> Regards, >> Raphael >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > >[[alternative HTML version deleted]]
Aditya Singh
2014-Nov-20 21:46 UTC
[R] Function returns NULL on running this code in latest version of R!
Any help on this issue will be greatly appreciated. Spent days sitting alone in a remote corner of the world--> Patiala, Punjab, India.. trying to do this! --------------------------------------------------------------------------------------------------------------- setwd("C:/Documents and Settings/Administrator/Desktop/Coursera/ProgrammingAssignment3/ProgrammingAssignment3") my_disease=0 my_min_index=0 best <- function(my_state, my_outcome) { outcome_data = read.csv("outcome-of-care-measures.csv",na.strings="Not Available") my_vector= which(outcome_data[,"State"]==my_state) my_initial_vector=my_vector[1] my_length=length(my_vector) my_final=my_length+my_initial_vector # return(my_initial_vector) if (my_outcome == "heart attack") { my_disease=11 outcome_data[ ,my_disease] <- as.numeric(outcome_data[ ,my_disease]) my_attack_lowest = min(outcome_data[my_initial_vector:my_final, 11],na.rm=TRUE) #my_attack_lowest_scalar = my_attack_lowest[1] } for (i in 1:my_length) { my_check_outcome= outcome_data[(my_initial_vector+i-1), 11] #my_check_outcome_scalar= my_check_outcome[1] #my_check_outcome= outcome_data[which(outcome_data[,"State"]==my_state),11] # my_check_outcome<-as.numeric(my_check_outcome) if (my_check_outcome_scalar==my_attack_lowest_scalar) { my_min_index = i # my_min_index return(subset(outcome_data$Provider.Number==my_min_index, outcome_data$Hospital.Name)) } return() } if (my_outcome == "heart failure") { my_disease=17 } if (my_outcome == "pneumonia") { my_disease=23 } #outcome_data[my_min_index,"Hospital.Name"] return() } #outcome_data[my_min_index,"Hospital.Name"]------------------------------------------------------------------------------------------------------------- Aditya