Aesthetics must be either length 1 or the same as the data (1983): colour

tudo bem? Estou tentando fazer um gráfico de interação no R usando o pacote ggplot2, no entanto o seguinte erro está ocorrendo

Aesthetics should be the length 1 or the same as the data (1983): color.

Alguém pode me ajudar?

Data base: http://halweb.uc3m.es/esp/Personal/personas/durban/esp/web/cursos/Maringa/gam-markdown/index.html

Os dados estão na seção data.zip, a base dados é a leukemia.txt. Note: Eu estou utilizando as seguintes librarys:

library(nlme) library(ggplot2) library(GGally) library(splines) library(nlme) library(fields) library(lattice) require(ISLR) library(grid) library(dplyr) library(MASS) library(mgcv) library(latticeExtra) library(fields) 

Segue o código abaixo:

setwd("C:\Users\breni\Google Drive\Acadêmica\Mestrado\Splines") dados <- read.table("leukemia.txt", header=TRUE) dados$  treatment  <- factor(dados$  treatment) dados$  case  <- factor(dados$  case) head(dados) attach(dados)   interaction <- dados %>%   dplyr::select(height, age, case) %>%   group_by(case, age) %>%   summarise(Average = mean(height))  x11() ggplot(interaction, aes(x=age, y=Average, colour=treatment, group=case)) +    ggtitle("Evolução da altura em cm no tempo para cada individuo") +      geom_line()  

Germany Visa application, Not refused Not Accepted either

I’m Uzo, I’m a Master degree in a University in Turkey. I secured the Erasmus+ internship grant for Germany. The grant provides monthly support of 600Euros and for my Visa application provided personal funds to complete the monthly budget upto 725euros per month. I applied for a 12-month national Visa, and İ provided all the required documents proving my student status as well. All the requirements were met. However the consulate officer received all my documents, returned my passport to me and asked me to go and wait. I was neither accepted or given a rejection. He mentioned that I’ll need a monthly upkeep of 1600Euros, and I was surprised because the information on the website stipulated that students require an upkeep of 720Euros. Has anyone ever experienced such situation? What could be the possible outcome? What steps can I take regarding this?

Thank you in advance for your response

When multi-classing, can you always select any spell from either spell list, as long as you have the correct level slots to use it? [duplicate]

This question already has an answer here:

  • Can a multiclass Wizard copy any Wizard spell they find into their spellbook? 4 answers

Apologies if this is a duplicate (or just common knowledge) but I found it hard coming up with a way to search for this succinctly enough to get a definitive answer and I haven’t really played a spellcaster before.

If I have a warlock level 5, the warlock has slots of 3rd level. If I then put my next level into a sorcerer. Can I select sorcerer spells of up to level 3, or can I only select sorcerer spells of up to level 1 (i.e. the sorcerer level). I understand how spell slots are added between classes etc, I’m just not sure of this one thing. I had a look at the multi-classing section but either didn’t see it or didn’t understand it when I did see it.

Whatsapp App disapeared from my Android, It now will not load it again, nor any other Apps either

My partner was changing the supplier of our router downstairs. I didn’t know he was. I was upstairs and started using my Android smmartphone, I presssed the Whatsapp app to use it , and it disappeared from the desktop of my smartphone. My smartphone is called IMO Q2 – I bought it in Tesco for a budget deal for Christmas. Unfortunately now it won’t seem to load any other App when i tried that too. I have done all the common fix tips like clear cache and clear data from my settings > apps> playstore app. I restarted the phone a lot of times and tried these fix tips a lot of times, all to no avail. Until now i didn’t think to try another app the same, but it will do download 100% for both, but then cvomes up with message for both : Cannot install Whatsapp try again, or see the link for common problems, which I did. Our router downstairs is fully working with new provider but don’t know if this was what caused it. Oh I did forget to say, that initially the App was in the shortcuts page on my phone, but i thought i should uninstall it properly so i did, then i thought i’d be able to simply re-install it as easy as it was when i first did. This has proved to be impossible so far, nor any other Apps now, so what could it be, an error of this kind? Can anyone help?. Please.

TWRP only allows flashing into either the Boot or Recovery partitions

I’m trying to flash a Pixel Experience GSI onto my 2017 Samsung (SM-J730G) using TWRP. In order to do so, I need to flash the GSI’s system.img into my device’s System partition. However, my TWRP only allowed me to flash into either the Boot or Recovery partitions. The other options I see in other phones (System, Vendor, Preload, etc.) are nowhere to be found.

Program for finding longest run of zeros from a list of 100 random integers which are either 0 or 1

I have written an answer to this question on Stack Overflow. To make it easier for you I have copy-pasted the main question below.

Write a program that generates 100 random integers that are either 0 or 1.

Then find the:

  • longest run of zeros, the largest number of zeros in a row. For instance, the longest run of zeros in [1,0,1,1,0,0,0,0,1,0,0] is 4.

My answer to this is:

import random  l=[]  def my_list():     for j in range(0,100):         x=random.randint(0,1)         l.append(x)     print (l)     return l  def largest_row_of_zeros(l):      c = 0     max_count = 0     for j in l:         if j==0:             c+=1         else:             if c > max_count:                 max_count = c             c = 0     return max_count  l = my_list() print(largest_row_of_zeros(l)) 

NOTE: I have changed zero_count to max_count as it sounds more sensible. It keeps track of the max_count (or the largest number of zeros in a row) seen so far and if a number is not 0, it resets the value of c (count) to 0 after updating the value of max_count with a new value.

So I would like to know whether I could make this code shorter and more efficient.

Any help would be highly appreciated.

Newbie question (s): Can’t connect to Ubuntu server VM (VirtualBox) on local machine, can’t seem to restart network manager either

A bit of background: This tiny project went from a curiosity to a “kind of” mandate at work (this is all just to set up a website sandbox). And so I created an Ubuntu (18.04.2) VM with VirtualBox and it seemed to install ok.

The docs and tutorials I have gathered up seem to be outdated because when I installed I was only given the option to install OpenSSH, and not LAMP (as seemed preferable from the docs I looked at).

I changed from NAT to Bridged Connection.

And most docs say that I have to then restart the network. And here is the second oddity. No matter what command I use (pick one, gotten from here https://linuxconfig.org/how-to-restart-network-on-ubuntu-18-04-bionic-beaver-linux):

$ sudo netplan apply $ sudo systemctl restart NetworkManager.service $ sudo service network-manager restart $ sudo nmcli networking off $ sudo nmcli networking on Everything returns a “command not found” error.

However, I can change back and forth through the network options and do an ifconfig and I see that there are differences. So I assume that the network machine is picking up the changes.

Now the kicker, I can’t access the VM through any browser. Firewall is off, but I always get a “connection timed out” error.

What steps might I have missed that keep this VM undiscoverable?

Thanks!

tags are not supported in the HTML specified in either the Content property or the Content Link property

I’ve got two SharePoint Online site collections. One is rather old, the other one was created about two hours ago.

There is an HTML file located in _catalogs/master/webparts/test.html with the following contents. Notice that there is no tag.

<h1>TEST</h1>  

Now that I add a CEWP to a page and reference this simple HTML file the webpart displays an error:

< FORM > tags are not supported in the HTML specified in either the Content property or the Content Link property. You can remove the < FORM > tag, or use the Page Viewer Web Part, which supports the HTML < FORM > tag. More about the Page Viewer Web Part

I have the same problem in two site collections no matter what HTML I use. At the same time, on other two site collections, there is no such problem.

More info. If I move this html file from _catalogs/master/.. to Assets library then CEWP displays it quite fine. But I’ve been using _catalogs folder for HTML files for over a year with no problems, and I don’t understand why all over sudden it’s happening on several site collections. The old site collections with the same approach are still working just fine…

Did anyone encounter this weird bug? Any ideas how to fix it?

Is there any reason to enable IMAP on Gmail? Works either way

Gmail has an option where you can enable IMAP, I’m using G-Suite, so not sure if this is available in the free version or not, but I noticed whether or not I enable this I can connect to Gmail without problems.

I have read that this may be because Gmail naturally runs over IMAP, but then what’s the point of having the option to enable/disable it – is there any difference?

Also, I have read there are some security concerns if you enable it – but isn’t it working all the time anyway as discovered?

Edit: I am using Thunderbird as an IMAP client to connect to it from my desktop.

Check whether a value exists in either cell in a pair of rows for a whole column

I have a spreadsheet that operates as a roster and I want to work out coverage. So each column represents a shift and each pair of rows represents a day because each day has two slots available.

To explain what I mean, consider this table:

 |   Col1   |  Col2   |  Col3   |  |----------|---------|---------| | John     | John    |         |   | Bob      |         |         |   | -------- | ------- | ------- |   | John     |         |         |   | Bob      |         | John    |   | -------- | ------- | ------- |   | John     |         |         |   |          | Bob     |         |   | -------- | ------- | ------- |   | -------- | ------- | ------- |   | 3        | 2       | 1       |   

Each name is on a different row (the —- separator is just for clarity). I want to first check if a string exists in each pair of rows (to indicate it has been covered) and then the bottom row represents how many of the days have coverage.

Currently, I just do a =IF(OR(C3<>"", C4<>""), 1, 0), =IF(OR(C5<>"", C6<>""), 1, 0), etc. for each pair in a separate column and then sum it at the bottom but I feel that there has to be a better way.