similar to: Overlay line on a bar plot - multiple axis

Displaying 20 results from an estimated 400 matches similar to: "Overlay line on a bar plot - multiple axis"

2018 Apr 30
1
Overlay line on a bar plot - multiple axis
Hi Miluji, Using Jim's interpretation of your desired graph, you could do it in ggplot2 using your dat DF by: ggplot() + geom_bar(data=dat, aes(x=week,y=count,fill=city),stat="identity",position="dodge") + coord_flip() + geom_line(data=dat, aes(x=week, y=mean_tmin)) There would still need some work to be done to get the weekly mean into a legend, but it is
2008 Dec 05
2
Help with wavCWTPeaks
I cannot understand the following error printed out when I try to get the extrema of my time series. I would appreciate some suggestion as I really cannot interpret the error. I might not be using a proper set of parameters in calling such functions. I am learning by doing ... > aa.peak <- wavCWTPeaks (aa.tree) Error in `row.names<-.data.frame`(`*tmp*`, value = c("1",
2018 May 16
2
Bilateral matrix
xtabs does this automatically if your cross classifying variables are factors with levels all the cities (sorted, if you like): > x <- sample(letters[1:5],8, rep=TRUE) > y <- sample(letters[1:5],8,rep=TRUE) > xtabs(~ x + y) y x c d e a 1 0 0 b 0 0 1 c 1 0 0 d 1 1 1 e 1 1 0 > lvls <- sort(union(x,y)) > x <- factor(x, levels = lvls) > y <-
2018 May 08
2
Bilateral matrix
I have data on current and previous location of individuals. I would like to have a matrix with bilateral movement between locations. I would like the final output to look like the second table below. I have tried using crosstab() from the ecodist but I do not have another variable to measure the flow. Ultimately I would like to compute the probability of movement between cities (movement to
2018 May 17
0
Bilateral matrix
Dear William and Ben, Thank you for your replies and elegant solutions. I am having trouble with the fact that two of the previous locations do not appear in current locations (that is no one moved to OKC and Dallas from other cities), so these two cities are not being included in the output. I have provided a better sample of the data and the ideal output (wide form - a 10x10 bilateral matrix)
2018 May 08
3
Bilateral matrix
or in base R : ?xtabs ?? as in: xtabs(~previous_location + current_location,data=x) (You can convert the 0s to NA's if you like) Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, May 8, 2018 at 9:21 AM, Huzefa
2018 May 16
0
Bilateral matrix
Dear Bert and Huzefa, Apologies for the late reply, my account got hacked and I have just managed to recover it. Thank you very much for your replies and the solutions. Both work well. I was wondering if there was any way to ensure (force) that all possible combinations show up in the output. The full dataset has 25 cities but of course people have not moved from Boston to all the other 24
2018 May 08
0
Bilateral matrix
Dear Miluji, If I understand correctly, this should get you what you need. temp1 <- structure(list(id = 101:115, current_location = structure(c(2L, 8L, 8L, 3L, 6L, 5L, 1L, 2L, 7L, 4L, 2L, 8L, 8L, 3L, 6L), .Label = c("Austin", "Boston", "Cambridge", "Durham", "Houston", "Lynn", "New Orleans", "New York"), class =
2008 Aug 11
2
Auto Vacation replies again
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry to bring this up again. I have now configured my test server to pass all email messages off to our central campus email filter gateway. This gateway scans all email traffic for viruses/spam before being delivered to any local mail servers. Once I did this my auto vacation replies are getting canned due to the fact the from header line is empty
2008 Aug 06
1
Dovecot auto vacation with sieve doesn't work
Guys, I'm running out of hair to pull out ;). Can anyone out there say that this does work?? To me this is looking like a bug and I'm not sure whether it's the sieve plugin or the dovecot deliver program. I have also had no luck the the "reject" sending any reply back to the sender. My setup: OS: Solaris 10 sparc platform postfix: 2.5.2 dovecot: 1.1.2 sieve plugin: 1.1.5
2012 Oct 14
3
Pivot Table "like" structure
HI Team, I am currently working on problem and stumped on "for" loop. Data: structure(list(Coutry = structure(c(3L, 3L, 3L, 3L, 2L, 2L, 1L, 1L), .Label = c("J", "M", "U"), class = "factor"), State = structure(c(1L, 1L, 4L, 2L, 5L, 5L, 3L, 6L), .Label = c("A", "C", "K", "O", "S",
2008 Sep 15
2
Network Help
I have searched the internet, and have tried some things I have found, but cannot resolve my issue. Hoping to find some help here. I have a peer to peer network static IP on all workstations, approximately 100 computers running Windows XP pro, and Windows 2000 pro. My desktop, Ubuntu, and one Linux Server, running Red Hat 9. The RH9 machine has Samba v2.27 running as WINS. It is set as
2003 Jan 29
3
na.rm in sd()
Hello, I think this qualify as a bug > x<-c(1,2,3,4,NA,6,7) > mean(x) [1] NA > mean(x,na.rm=T) [1] 3.833333 > sd(x) Error in var(as.vector(x)) : missing observations in cov/cor > sd(x,na.rm=T) Error in sd(x, na.rm = T) : unused argument(s) (na.rm ...) > var(x) Error in var(x) : missing observations in cov/cor > var(x,na.rm=T) [1] 5.366667 > why sd() does not
2012 Feb 03
3
Cannot get "==" operator to return TRUE
I have a data.frame named "df". The dput of df is at the bottom of this e-mail. What I'd like to do is replace the "n/a " values with NA. On Mac OSX, it works to do this: df[df == "n/a"] <- NA However, it does not work on Ubuntu. See below. Thanks in advance, Garrett > x <- df[27, 4] # complete data.frame dput is below > dput(x) "n/a?"
2019 Dec 11
3
Friedman
Estimados Este es el test de friedman que se logra asi library(PMCMR) y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, 23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, 26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, 32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, 26.65),nrow=6, ncol=6, dimnames=list(1:6,LETTERS[1:6])) print(y)
2011 Jun 09
2
Problem with a if statement inside a function
I have a really long functions, and at the end of the function, I am using a if statement to tag certain keywords based on whether they have certain values contained in them. However, the if statement doesn't seem to work. When I had split up the commands into various functions, it worked fine, but I'm not sure what going on now that it's combined into a single function. myfunc
2007 Dec 08
0
help for segmented package
Hi, I am trying to find m breakpoints of a linear regression model. I used the segmented package. It works fine for small number of predicators and breakpoints.(3 r.v. 3 points). However, my model has 14 variables it even would not work even for just one breakpoints!. The error message is always estimated breakpoints are out of range. Since my problem is time related problem. So I
2004 Jul 29
5
Astricon Conference Call?????????
I know this is probably way out there but............ Would it be possible to set up a (Asterisk based) conference call (per se) with the presentations at the upcoming Astricon conference via IAXtel (or something similar) so that people who are not able to attend could join a Meetme conference (listen only) and listen to the content. There maybe bandwidth issues but this would certainly be an
2009 May 26
9
cookies are mandatory for Rails app?
is it true that Rails depend on cookies? It seems that flash is a part of session, and session uses cookies... so when i disable cookie in Firefox, what was working became ActionController::InvalidAuthenticityToken so is it true that for a RoR app to work, cookies are mandatory? -- Posted via http://www.ruby-forum.com/.
2005 Nov 06
2
cox models
Hello, i'm a french student of medical oncology and i'm working on breast cancer. I have a variable with the histologic type of tumor wich is between 1 and 5. I use as.factor function to make some variable with level between 1 and 5. When i put it in the cox model i have only the level between 2 and 5. The level 1 doesn't appear. I think i have to change the number of level but i