If you want to be able to zoom in on a portion of your screen for the purposes of doing screen demos and the like, then there is a way that you can do this with some built-in functionality in macOS, and that is what I'll be telling you about in this video.  It's something that I use all the time on my channel to basically highlight areas of the screen and to zoom in and things like that and to spotlight. But I know that not everybody is a fan, not everybody seems to have quite the results I have with that app because it's worked flawlessly for me, but sadly not for everybody. So today I want to tell you about another option that you have that does actually still work with ProMouse as well, so you can have the best of both worlds. But that is an accessibility feature that is built into macOS that allows you to zoom in on a part of the screen. And so if you use this when you're doing screen demos, doing screen sharing and things like that and in demo mode, in Ecamm Live, then it can sort of help you to get your point across and show just the parts of the screen that you need people to see. Now, I've got to say first of all, thank you very much to Phil Binks because it was him that told me about this on my last live stream actually as it happens. And then I came straight off that live stream and went on to start watching one of Dot Rocks and he was talking about the exact same thing. So Phil got there first though. So I'll leave a link to Phil's channel which is helpful, Phil. I'll leave a link to that up in the top corner. That's got loads of great tutorials and stuff like that. And if you like the sort of stuff that I'm covering on here with Ecamm Live tutorials and so on, then definitely go and give him a watch as well because there's lots of great stuff on there. So let's get into exactly how it works, shall we? There we are in the, in fact, no we're not, we've gone straight, I've skipped ahead. Sorry about that. If you open up system preferences on the Mac, then you do have this accessibility tab here. So this one. So you want to click on the accessibility and then in here there's lots of different accessibility features that you can have a browse through because there are some more of them that they're obviously intended for people who have accessibility issues with the interface and so on. But some of these have other uses. In fact, that's exactly what we're doing with this one, which is this zoom tool. So I'm going to click on to zoom, and then zooming, making it bigger as opposed to the Zoom communications app. As if that wasn't obvious. So here you've got a few keyboard shortcuts. First of all, let me just actually demo it, shall I, just to show you what we're talking about before we get into how to set it all up. And I'm going to come into my demo mode. And as you can see, I've got a bit of a big screen here. It's a 4K screen. And so I'm guessing that it's probably hard to see some of this writing over here in these little windows and things like that. So when I'm doing screen demos, normally what I would do is I would actually take my 4K display and I would scale it down to 1080p so that it's a little bit more readable when I'm sharing the full screen like this. But actually now what I can do is I can simply just zoom in on a particular area of the screen. So let's say I want to just zoom in on just this main window and the ECAM controls. And now hopefully you can see these a little bit better. And I can still use my ProMouse by the way. I can still use the Zoom feature on that on top of it. And I can also use my little spotlight as well. So that is basically what this Zoom tool allows you to do. And so let's have a look now at exactly how you set it up and these settings. So first of all, there is a keyboard shortcut that you can assign to this, or there is one pre-assigned I should say, to actually toggle the Zoom on and off. Let's just have a look at what that looks like. This is command option eight. So if I come back into my demo mode and I press command option and eight, you'll see that it just sort of zooms in a little bit. There we go. And then I can press command option and the plus and minus to basically zoom in and out further. So that is how you do it manually by pressing the keys. But what I'm gonna do is I'm gonna show you how to come in here and you can also have this gesture, use a scroll gesture with a modifier key. So basically, if you've got a scroll wheel on your mouse or if you're using a trackpad, then you can come to here and you can change the modifier key. So I've got it as control. So all I'm doing now is I just hold down my control key and then turn my little scroll wheel like that. Now, I should say the default behavior of this is that when you scroll in, the pointer stays, it scrolls into where your pointer is on the screen. And then obviously now we're cropped into the center. So this might not be the place that we want. So you can move the mouse over to the edge and when you move over to the mouse over to the edge, then it will sort of move the edge of the viewing area if you like with you. So I'm moving over to the side here. Then if I move down to the bottom, it will get that edge there. So that is one way to do it. But personally, I find that if I go up into the top corner and then scroll with the mouse right in that top corner, then it's gonna just keep that nicely centered, not centered, it's gonna keep that top corner in the top corner and I'm just zooming in on that portion of the screen, which actually for the sorts of demos that I do works out well for me because I tend to just have things positioned and those positions on the screen. And so I can just zoom in on the particular area that I want to show. And so that just zooms in quite nicely by having the mouse in one of the corners. There is some ways that you can do this in a little bit of a different way that I'll come on to in a moment when we look at some of the advanced features that it's got. But also I should mention the zoom style. So here there are three zoom styles. We've just had a look at the full screen one, which is the default, but you can also have it in split screen. I don't think that this is gonna be particularly useful for this use case that we're talking about here. I'll just show it to you anyway, but if we toggle that one on and then I zoom in, you can see what's happening. We've got the regular size screen at the bottom and then the sort of zoomed view is up at the top, but it's not really well suited to screen sharing, I don't think in terms of doing demos and things like that. One that is perhaps useful is the picture in picture. So when I've got that one toggled and I zoom in, you can see how it's basically got this little window and it's just acting like, I suppose like a sort of square magnifying glass and I can still use the scroll wheel to zoom in and out on an area and it is just sort of highlighting it on the screen. So that one could be a useful one to use. Personally, I'm gonna stick with the full screen because like I say, I am still using this in conjunction with my beloved pro mouse that a lot of people don't seem to love quite as much as I do. So then I'm gonna come over to this one here, choose display. Now you may well think that you can see here that this is basically my monitor, is this one at the bottom and then let me come out of demo mode. My monitor is the one at the bottom and then at the top is my teleprompter monitor. So I'm not going to adjust these at the moment but if you've got one that's set to display to use for zoom, you might be forgiven for thinking. I'm forgiving myself because this is what I thought. You might be forgiven for thinking if you select one of these, the zoom will only affect that because actually what is happening is when you're zooming one screen, if you zoom out, you will actually see it go across all of the other screens as well. So it would have been nice if I could just have one screen that zooms. So that's what I actually thought that this does but actually if you have one of these displays selected, what that does is it shows the output of the zoom on that other display. So that's not at all what we're looking to try and achieve here. So you do probably for this use case want to leave that display as zooming for all. It's almost, yeah, not worth even going in there but I just thought I'd explain what that is. So then you've also got this option here, enable hover text. Now I'm going to toggle that one off but I've got it on just to show you what that is. So let's come into demo mode. I've just realized I've moved this out of the way, haven't I? That's no use. There we go. This one here, enable hover text. So just holding down the option key will do this and so let me just demo what this is. If you've got this activated and you hold down the option key and you hover over a piece of text then it basically just makes that larger on the screen so you can read it. So if I'm on some great website like the Ecam live website and then I hover over some text and then I just press the option key, it will just make it larger. So obviously this is an accessibility feature for people who find it hard to read and so it just makes the text larger on the screen. So next I'm going to go into the advanced section here. So if I click on that, we've basically got two tabs at the top. We've got appearance and controls. So appearance, there's a few different ways that you can have the zoom window if you like moving around or the zoom area moving around. Initially it's set to this only when the pointer reaches an edge. So that's how I had it so that when I zoom in it will basically zoom in on whatever area I zoom into. So if I move the mouse over this corner it will zoom down here but then the actual window will only change when I move the mouse to the edge. Well, there is this other option to move continuously with pointer. If I touch that one or switch that one on rather you can see that now as I move the pointer around it's moving all over the screen. This is not necessarily going to be the best way to do things if you are going to actually be physically demonstrating steps that people are taking. But if you do want it where you just literally want to be able to zoom in to highlight an area of the screen and then you're going to come straight back out of it then that might be actually the way to go because it's easier to sort of position the thing on screen. So like here if I wanted to just show this window and then maybe go across and show this one then having it sort of following the mouse round would be a good way to go. But if you're going to be doing sort of tutorial demo style things where you've got to show this, you know lots of different steps then yeah it might make people a little bit dizzy. There is a similar option which is this one in fact let me just use this while we've got it here. So if I click this one so the pointer is at or near the center of the screen it is very similar actually but there is just a little bit more sort of movement and it doesn't move quite as much. I don't think as the one at the top you can see there's some places where if you're near the center of the screen then it's not sort of bouncing all over the place. So that's just moving sort of from side to side, isn't it? Whereas if I come to this one then it's just basically following the cursor round entirely. So you've got a couple of other options here so I'll leave this one at the moment as it is so only when the pointer reaches the end of the screen that's going to suit the style of things that I'm doing which is like I say just zooming in on a specific part of the screen and then doing my demo as normally. So the other options you've got here are restore zoom factor on startup which would make sense just to have everything reset and then these other ones are not necessarily related to what we're talking about here. Smooth images so that's just obviously if you're zooming in on an image it doesn't become too pixelated and you don't get too much anti-aliasing along the edges. Then flash screen when notification ban appears outside the zoom view. So this is specifically like if you've got if you're zoomed in on a part of the screen and then you get a notification somewhere else on the screen this accessibility feature gives you a sort of flash to let you know that that's happened but for giving screen demos I'm guessing you probably don't want to be bugged by notifications anyway so that one can just stay off and follow keyboard focus just means it's going to follow wherever you are, whatever you are doing with the keyboard but again I'm going to leave that one off for now and then in the controls there are a few extra controls in here. So you can have it so that you can activate some or all of these and basically here we've got one to temporarily toggle the zoom so if you don't want to actually activate it in it zoom in and stay zoomed in you just want to quickly activate it you can hold down this key if you've got this one selected and that will just sort of activate the zoom for as long as you've got these keys held down. You've also got one to temporarily detach the zoom window from the pointer so the zoom window will the pointer will stay where it is on the screen but you can move the screen around. So it's actually a little bit the opposite way that I would have liked it to be honest because what I would have liked to have been able to do is zoom in and then when I hold down that key option and command you can see that basically now I've got a little it's leaving the pointer where it is that's that little pro mouse circle but now I can move the screen around. Ideally I would have liked it the opposite way so that I could use that sort of follow the screen with the pointer and then when I detach it I can move the mouse around but the screen stays where it is but anyway that's just my personal preference. That isn't what this thing is intended for so I'm not going to complain about it. There's also I showed you the difference between the full screen and the picture in picture so that was the one where it was like a little sort of square magnifying glass or rectangular magnifying glass. Well here if you want to be able to switch between the two kinds of magnification you can activate this one and so that will toggle between full screen and picture in picture so you can just toggle between those two and then also you've got one here to adjust the actual zoom window by keyboard shortcut as well. And these other ones are related to the maximum zoom size, the magnification and you can set limits and things like that as well but for now that is pretty much all that we're going to set for it and I've got that enable hover text off because that might conflict with some other stuff and I don't really use that but now we are basically good to go and so if I come back into my demo mode this is pretty much solved my large monitor problem and I probably won't be changing the resolution of my monitor like I always used to be changing it in and out when I was doing demos of stuff that I knew were going to contain a lot of detail. So thanks once again to Phil Binks for putting me onto that. I know lots of other people have been using it as well but I'm a bit late to the party with it so I hope it helps some of you as well. I'll definitely come out of demo mode, shall I? There we go. And yeah, it's a really great way to highlight areas of the screen and like I say, it will work with your, anything you've got on the screen so it will work with ProMouse, MousePosay or any of these other sort of mouse pointer applications as well. If you found this useful then don't forget to go and like it but also head over to Phil's channel and go and check out some of the other great stuff that he's got on there. So for now I'll leave a link to some other e-cam live stuff over on the right hand side and YouTube will pick a personally picked video just for you up in the top right. So until the next one, have a great day.


Yes? They have the reference part of the back side. Okay. Great. Excellent. Okay. So I guess we're going to start by looking at R, and I should say that, you know, this, I mean, I want this workshop to be very easy for you guys. So if you've got any questions or anything, any concerns, you know, you can stop me anytime. If there's something that's not clear, I'll explain it again. And we're going to play with R as we go along. So we're going to make sure first that R is installed and is running on your machine, and we can do all of the things before we move on. So can you make sure that R is started and you have it in front of you? If everything's working or seem to be working, if it's not, just raise your hand. Okay. You know, can you jump on it? Okay. So first we're going to go through R, and as I said, it's going to be fairly basic. So for those who really know R, and you know these basics, you know, just bear with me, we're going to move on to some more interesting stuff. If you don't know R and you feel lost, you know, I mean, this is, it's always very difficult to teach something that you know very well, because maybe what seemed really basic to me might not be that basic to you. So if you feel I'm moving too fast, you know, just tell me and we can make sure that you're on board. Any questions so far? No? Okay. So I'm going to start a little bit and I'm sure she'll catch up. So the first thing you can, you can see is that R is just a calculator, okay?  So what we're going to do, we're going to go and launch R and we're going to play a little bit with the few comments. So I should say that in the other folder that you have, probably it's a good thing that you put it somewhere, you can access it, maybe on your desktop, whatever, in that folder you have the slides and you also have a file called script.R maybe or something like that where there's all the R comments in it. So you can either copy and paste from the slides or you can copy and paste, probably that's better from the R file that's in the folder. So you probably downloaded a folder. No, I don't actually, I don't know. Michelle, did you put the folder online and okay, is that, do you know if people have downloaded that already or should we do it now? Okay, can you tell me where it is? Behind me, okay, good, good. Okay, so we're going to go right here and we're going to download all the files. Yes, what a show, do I have one or? Yes, you do. You probably sent it to me. Okay, good, so what we're going to do is that we're going to download, we're going to do that right away. There are three data sets we're going to use. The first one is a full cytometry data set. The second one is a gene expression data set. And the other one is a time series expression data set. So we're going to download these three data sets along with the script. Okay, and this is where we're going to have all the comments for art that we're going to use today and tomorrow. We're going to save that. So just put it on your desktop, it's probably the easiest place so that you're going to be able to access all the files very easily. This is going to be the hardest part of the workshop. Once this is done, it's going to be super easy. Okay, so we just go and download all the files. Are you good? Is that okay? Yeah, what does he say? So, if you cannot open the file, what you should do is launch R and in R, so I don't have windows. So it's probably going to be very different from you guys. But you can go into a file open and you're going to open the script that R. And R is going to know that it's an R file, so that should be okay. And if you have problems, just raise your hand. Yes, say that again. If you just get the screen for URL, that's the screen. Yeah, but I don't want to copy and paste some things. Okay, so you should be able to open a file like this, and it comes in all the R commands we're going to use for this day. Is that okay for everyone? Okay, and you should have your R console open as well. And R is running here. And don't pay attention to the version number, so I have 2.10. Because we always need the latest version for what we do. But you should have 2.9, which is fine. Okay, for everyone, if it's not, just raise your hand. Okay, so we're going to try the first thing. So as I say, R is just a calculator, so we can just use it as such. So if you want to do two plus two, you can just copy and paste that. And of course, it's going to tell you it's four. You can actually play with it, do some other things, where it's just fine. There's also lots of mathematical functions that I built into R, like the exponential, okay? Also, as some built-in variables like pi, for example, you know, you often use pi in mathematics and statistics. So it's nice to have a variable that really contains the value of pi. So this is known to R. If you tap pi, it will be 3.14. There's also the sine and cosine functions, you know? So it's really just like a regular calculator that you've used before, and you're probably going to use it in the future again. Is this okay for everyone, this part? Tell you it's going to be really easy. Yes. You know, if something's not working for you, just let us know.  Oh, you can. So yeah, I didn't do that. We can try. They do. So of course, so someone just asked, you know, in R is, you know, can you use parenthesis in brackets or whatever in the calculator? So of course, you can. So if you want to do 2 plus, so you know that there's an order that, you know, the multiplication is always going to be done before the addition and so forth. So if you do that, let's say 2 plus 3 times 4, it's going to be 14, right? But if you want to do 2 plus 4 first, then of course you're going to put parenthesis, and therefore it's going to do 2 plus 4 and then multiply that by 3, okay? So you can use parenthesis if you want to. Just like a regular calculator.  Okay, so we're going to wait a couple more minutes. So the next thing we're going to see is that in R, often you don't really know what you're looking for, or you know you want to do something like you want to use the sine function or the cosine function, but you don't actually know the exact R command or how to use it. What are the arguments of that function? Okay, so the first thing you're going to look for is for help. Okay, and there's a really nice built-in help in R. You know, so it's very, very straightforward to find information about something you don't know, and for me, every day I use the help command, because you cannot remember everything and how to use all of the built-in functions. So the way you can do that, okay, is just by typing help and the name of the command or the variable or the function you want to know more about. Okay, you can either do help and parenthesis with the name of the function variable you're looking for, or you can also do question mark, which is the same thing. So if we go back in R, we can do help, okay, and that's going to tell me everything about the exponential and the log and how to use them. Okay, and the good thing as well is that it's going to give me a couple of examples at the end. So if you scroll down towards the end, there's going to be a few examples. Typically, the examples are probably the best place you want to look at when you don't really know how to use something, because you're going to understand right away how to use it. Okay, so here there's an example of x of 3, and of course, you know, that's going to be 3. So that's nice, and we can also type, you know, question mark if we want, that's going to give us the exact same thing. Okay, so it's kind of a shortcut for help. You can do the same thing with sign, great, okay. But let's say I want to, I don't know, maybe you want to type something, let's say we wanted to look for the sign function, but we didn't read on what it was, so we would type or exponential, okay. Sometimes you will, if you type a word, you might not really find something for it, right? Because this might not be the actual R command that you need. So the other thing that you can do is that, so I think I have an example in here, the thing you can do is use help.search. So help.search will actually search for a keyword or something that might not be exactly in our function or in our variable or in our command. But it will find all, it will actually try to look for all the help it can find that contains that keyword, okay. So typically this is actually easier to use that if you're looking for something you're unsure is actually in our function or in our variable, okay. So if you were just used to type trigonometry and question mark, no there's nothing about it, right. Because there's no R functions or R variables. But if you do help.search, you will try to search something about it, okay. And it's gonna take a little bit longer because it's gonna try to look for a topic that actually contains that. And here it found one and you can just click on that and bang, you've got, here's this a cosine function, there's the sine function, there's the tangent, okay, and so forth. Is that sort of clear how to use that? So this is something that you're probably gonna use a lot and that you wanna make sure you understand how to use it. Okay, so one of the question here is why did I put quotes here but not before, for example, right, when we do help? It's because here we don't really know what we're looking for. So it's like a keyword, it's not really in our command. So when you put here help x, you're telling R that look for a command or variable that's exactly that name. Here it's gonna say, well, try to look for a topic that contains that keyword, okay. So something that you don't really know something you wanna know something about, you just type that keyword. It could be plot or matrix, whatever keyword that you wanna know something about. Okay, so far so good for everyone? So a calculator is very nice and you can just type a couple of comments and do some very basic calculation. But even on a very simple calculator, just like a tiny pocket calculator, you need a way to store intermediate results, right? Often you're gonna try to put a couple of things in memory so that you can reuse it later or you can make it easier to compute something. So we need a way to store variables in memory. And this is done via the assignment. We're gonna create some variable that are going to contain some value. And the assignment in R is done via that command, which is kind of like a left arrow. So we're gonna go back in the script. And this is an assignment, okay? So we're saying create a variable x and put the value two in x. The second one here says create a variable y and put the value two in y, and then we can just do x plus y. And R's gonna know that what we wanna do is two plus two because x contains two, y contains two, therefore we do two plus two. So let's try that. So let's first try to copy and paste it, okay? So x is in memory now. So if I type x, it's gonna know that its value is two. So we can do the same thing for y. And of course, once a variable is created, you can change its value if you want. You can say, no, I didn't want two, I want three, so you can do that. No, once you have overwritten value, you can go back to the previous one. It's over, okay? So you need to be careful when you store intermediate results. You have to reassign. So if you wanna say, no, it was due, you have to redo that, okay? So one thing that you're gonna, maybe not right away, but after you know a little bit more about R, you're gonna feel more confident on how to use it. And therefore, you're gonna start writing a little bit of code and things, and you're gonna create more variables and more intermediate variables. So you're gonna have lots of variables in your code, possibly. And so you might say x, y, z, a, b, whatever, you're gonna have lots of variables, and then you're gonna say, what is that variable used for? I don't even remember. So it's very, it's typically a good idea to give explicit names for your variable, right? So try to avoid the single later variable because it's hard to know what they are for and what they mean. So try to use maybe longer variable names. And one way to do that is to use an explicit name. So your favorite variable, and maybe you can separate the world with capital or dots or something like that. Is that okay for everyone? Are we okay in the back, Michelle? Sort of, okay. Okay, so of course here we've looked at creating variables, single numbers and calculation. But you all know that, and we've heard that this morning, is that when we want to do statistics and buy informatics, we're gonna have a lot more than just one data point, right? So we need to be able to store things that contain just one more than just one number, okay? So we need a way to store data sets and so forth. And we can do that via maybe vectors, sequences, and list. And we're gonna go through these things. So it's basically trying to use R as a way to work on data directly, data set directly. So one way you can do that, when you've got lots of elements, you can just concatenate these elements using the C function, okay? And we're gonna go through the example. So here's the example here. So I wanna create a variable that contains several numbers, okay? So what I'm doing is just concatenating these numbers using the C. So C for concatenate, and then you open the parenthesis, and you put all the numbers separated by a comma, and then you close up parenthesis, okay? So here we are just creating a vector or a list of numbers, okay? We do that, and we wanna look at it. You're gonna see that it contains several numbers. Of course it's a vector, maybe once you look at just one of the specific numbers in that list, maybe the first one, we can directly access that number using the brackets and you're saying, access the first element of that vector. Just copy and paste that, and that's going to give you the first number. If you want the second, you use that, and so forth. So doing what we're doing now, it's called indexing. So we can index a vector, and we're gonna learn more a little bit about indexing in a couple of slides. Is that okay for everyone? Indexing means you want to access a specific element of your vector, okay? So we're just indexing that element. And we're gonna learn more about indexing. There's a lot of ways you can index things. And this is a good thing about R and I would say programming languages in general. Okay, so let's say now we wanna create another vector. It's called height, okay? And let's say we wanna compute something that involves the height and the weight, and here's just the body mass index, okay? That we define at the weight divided by the height squared. And we can do that directly on the vector. So we can do operation on all the numbers at once. What this is going to do is that for each element of the vector, you're gonna do the exact same operation, okay? So we're gonna go through the example and you're going to understand that very easily. So we've got the weight vector, the height vector, and we're creating the body mass index variable of vector. By just dividing the weight, dividing by the height squared. So if we type that, it's gonna be this. And in fact, you can see that this, what this comment is doing is that it's working on vectors directly. And it's going to say, okay, for each element of that vector, and each element of that vector, I'm gonna do the weight divided by the height squared. So we could do that by hand manually, right? We could just do, let's try to take the first element, which is 60, and divide it by the first element of height squared. And that's going to give you the same thing here. You can do for the second element, we're indexing because I wanna show you that when you work on the vectors directly, it's the same thing as just working on each element individually, okay? And that's a great way because you don't have to do it by hand. R is just gonna work on the vector directly, and it's going to do that by just if you want looping over all the elements of the vector and doing the exact same calculation, okay? And so this is what we call vectorized operation, okay? That is, you're going to do an operation on the list, and it's gonna do the same operation on all the elements of that list, okay? And that's very important because when we deal with statistics or bioinformatics, we get lots of data, and we're suddenly not gonna do it by hand or try to write comment for each of the data point in the data set, right? We want to do things that are easy to use, that are fast, and are gonna work on the whole data set at once. It is sort of clear what we mean here by it's vectorized. It's gonna do the same operation on each element of the vector.  No, no, well, it's assuming that each element, first of all, it's assuming that the vector's at the same size, because if they don't, what do you mean by doing that operation, right? And that you wanna do, they're all or there's a pairing between the element of the vector. So each weight corresponds to the height in the other vector. So if you've got patients, for example, the first element of the weight is from patient one. The first element in the height is from patient one, patient two, and so forth. So ordering in that way, yes. Same number of elements, yes. Yeah, in fact, if they're not the same, r is sort of clever about it, well, clever yes and no. Because what it will do is it will take the shorter vector and it will do that operation on the shortest length of the two vectors. But you need to be a little bit careful about what you wanna do. Well, we can try, we try that. You know what, actually, well, let's try now. So we're gonna take the height, okay? And we're going to just remove the last element, for example, okay? And let's try to do the same thing again. So it's going to give you a warning here to tell you that they don't add the same length, but it's still going to do the calculation. In fact, if you look at EMI, you're gonna get something. So now one thing that you might say is that, well, it's weird because even though there's only five elements in the height, it's still giving me a number for the last one, okay? What r does is that when there's one of the vector that's shorter than the other, it's going to recycle the elements. So let's say here we do the operation for the six element. We did not have a height in here because we removed it for the six, let's say, patient. What it's going to do is it's gonna say, okay, I need one more element. So it's gonna go back and take the first one, okay? So it's going to recycle the elements. In any case, you don't have to worry too much about it because you do get the warning. You know you did something wrong. So you know that it's not valid and you should be careful about it. Well, I know because I know all works. Typically, no, and in the warning you wouldn't know. You just have to know all works. So it's just recycled. So if you've got two least, one that has ten elements, the other one has five. It needs more, so yeah, it's going to recycle them. So that's what I said about R is clever in a good and by the way, it's because it's still going to give you a result but it's not very meaningful. Good question. So can we know the length of a vector? So it's something probably I should have put here, but of course, we can just type length of the vector, okay? And that's going to tell us the length of it, okay? So here it's six, okay? One thing, so when you ask me a question, is there something to know the length of the vector before you ask that question? Try to find it on your own using the question mark, right? So it would be sort of a good test and you could see if you can actually learn information even though you didn't know about it. So here, let's say we did not know about that so we could just type, you know, the easiest way to do is to type length. In fact, here it is the name of the function. But if we did not know that, we could just do help that search. And the name of what we want, okay? And then it will look for a lot of things. So this is something that maybe would be interesting when you do help that search, is that it might actually return a lot of possible answers for you. But one of them, some of them are not going to be relevant. And the way it's going to solve these answers is that you're going to have a topic, you're going to have in which package it comes from, and you're going to have a description. Many of the packages, so here on my machine I have lots of packages installed. Probably on yours, you don't have that many packages, maybe you don't have any packages installed besides the base distribution. So typically what you would look for is first in the base distribution here, right, because this is what you care about. And here you can see that there's length and this is what we're looking for. So we'll go back to that later on. Well, so here let's say it did not, well, in that case, it does exist. But if we did not know, we could just do help that search and the name of what we're looking for, okay. And if it did not exist, maybe you would find something else that was related to length that would have a very similar name and you would see it, it would come up here, okay. So here it's not a very good example, but the trigonometry example I've used before, you could see that there was no function for trigonometry, but we still found what we were looking for, which is sine and cosine. Because sine plays. Doesn't have length. So. If you do question mark length, you don't get anything. And if I do length as a error, could not find a function well. I don't think that's good. How do you do, you must be using q instead of y. Good, good. You guys are learning, that's very good. I do that all the time too, so, okay. So we just learned how to concatenate elements with the c function and we can do vectorize operation. That is, we can just divide a vector by another vector and it's going to do the element-wise division, okay. One thing that you should know and we're going to come back to that later is that vector-based operation are very fast, okay. And there's other ways to actually do these operation by doing loops and things, we're going to talk a little bit about that, but typically it's going to be slower. Okay, so here's a little exercise for you. So try to find another way to create a vector. Okay, so let's say you want to create a vector. What would you do? Not using c or concatenate. If you know how to do it, don't say anything. But let's say you want to create a vector, what would you do? Okay, go for it. Question mark vector, all right. We're trying to look for a way to create a vector, so let's try to ask the helpful vector. Okay, so we can try to do that. Question mark vector. So here vector, there's a function called vector that produces a vector of the given length and mode. Okay, well, this might be a bit abstract. So what we're going to do is that we're going to go and scroll down to the example over here. So if we look in the example, we do look and find the c function. And there's some other things, but it's not really related to what we wanted to do, right? So now we type vector, we see c also c. So maybe this is more related to what we want to do. So we're going to click on this, because we know that this is the sort of things that we were looking for, so we click on the c. And that's going to give us some more information on perhaps how to create vectors. And right away you can see that maybe I didn't rethink of that example, because I don't really see what I was looking for. So this is, but it's a good example for something else in fact. Often you're going to try to look for things that are using the question mark or even help that search. So maybe let's try help that search, because here it's a way to create vector, but it's not really what I was looking for, because it's more abstract than the other thing I was looking for. So we're going to do help that search vector to try to see what we find here. So there's the c, okay, which allows us to do the concatenate. And we're going to go down, we're going to go down a little bit more. Yes, because you're using Windows, so maybe you have a different window or it might not look exactly the same. I don't, I do not know, let me see. So this is a great commercial for, you should get a Mac, eh? No, no, it's just a different GUI on Windows. So maybe it's not clickable. So for Christmas, you can just order a Mac and it will be clickable. In the meantime, you can just look at the specific comment. And so when you get a topic, so let's say, here's this rep, right? So you would see it, maybe it's not clickable, but you would see it. So what you can do when you have that, how does it call it? Once you have the R topic, you can do question mark rep, okay? Once you know what it is, you can just do question mark rep, and you will get the help for it. Okay, so maybe it's not clickable for you guys, but you should be able to just get the name and do question mark what you're looking for. Which we, it will do the exact same thing. We'll talk about packages soon, okay? But like this, when you see it, so in your case, it should be, there should be in the name of the package, which is base. And then you have rep after it, right? Whoever looks like that. Which tells you that rep is a function that's part of the base distribution of the core distribution of R. It's not very clear, we'll talk about packages. Is that okay for everyone how to go help on rep? Okay, so now it says that, so rep can replicate the value in X and it's a generic function basically to create vectors. So if we go to the help right away, we say, okay, here you do rep one, two, four, let's do actually something slightly easier. Okay, so let's look at the arguments. So the first one, it's a vector. So you can replicate a vector, it can just be a number. And the second argument is the number of times you want to replicate that. So let's just go in R, sorry. When you do question mark rep, so when you do, let me try again. If you do question mark rep like that, you get a, well, you would get a window, so close that one and redo it. Close that window and type question mark. You get it? Good, so if you type question mark rep and you still have the old window from vector, just close that window and do it again, it will open a new window with rep in it. Okay, so let's go back to this. So let's try to play with it so we can do rep. So we want to replicate two and ten times. Okay, that's going to create a vector of length two and it's going to just replicate two, ten times. Okay, so we're going to see more ways to create vectors later on. So this is just a little exercise to use help and try to find something. So while we talk about that, you're going to see that very often. You're going to look for something or come on. And it can be very easy to get lost in the health files of R, because there's a lot of functions sometimes. If you type a key word, it's not really going to give you what you want. And I'm going to be honest with you, probably most of the time I look for something or help on our topic, the best way to find it is via Google, okay? So you just type create a vector R in Google and it's probably going to give you better answers than what you would look by using the help. That's right, yeah. They get paid enough that they can actually do these sorts of things, yeah. Yeah, whereas the people who actually work on R are probably too poor to spend a lot of time on creating nice manual pages. Okay, so another thing that we didn't talk about is that C can be used to concatenate not only vectors, but string and letters, whatever you want. So we're going to see that through a couple of examples. So just to summarize vectors, we've got three ways of vectors. One we've seen, which is a numeric, is just going to be a list of numbers. Another one that's going to be logical, it's going to be a list of what we call Boolean variables, true or false. We're going to see an example of that. And we're going to have vectors of type characters, just going to be a list of strings. So let's go see a couple of examples of that. Okay, so here we create the vector, which is just numeric. And copy and paste that. If we type x, that's just three numbers. Now we want to create a vector of logical. So the first element is true, then it's true, then it's false, then it's true. These types of variable are called Booleans. It could be either true or false, or sometimes it's coded as 0, 1. And it's very helpful when you're trying to make a statistical decision or something to have search variables, okay? And another one is just putting a bunch of string of characters together, okay? And it's going to see that it's just a vector, but each element of the vector is a word. And again, there are vectors, so we can index, so we can access any of the element in the same way as before. So if we want the third element of the x vector, it's going to be name, okay? If you want the fifth element, it's going to be Francis, okay?  And we put them into a vector so that the first element is the word hello, the second one is mine, then third my name is, and so forth. And we're going to access any of these elements. Is that clear for everyone? So why do you need quotation marks? Good question. So if you don't, all we think that you're trying to manipulate a variable. So you need to make a difference between a string and a variable for R. So let's go back in R. If you type name, it's going to say error because object name is not found. If we do name two, okay? Create a variable that's called name, contains the value two. And then I can print that variable, it's two, okay? But then if you don't put quotes around name, how it's going to know that you want to use the word name or the variable name, okay? So you need to make a distinction between the two. So putting the quote is saying, I just want to use that as a string, that's name, another variable name. So it's different from the variable, okay? So for what to use, in fact, you could do that here, okay? Let's try to do that. We replace the word name by name. What is that going to do? It's going to use the variable, okay? So when you concatenate things that have different types, such as numbers and characters, the default will be to turn everything as characters or as strings. So in that case, name was just a numeric value two. But because you wanted to concatenate with other strings, it says, okay, let's convert that into a string. You can only add vectors of the same kind, either all strings, all characters, all Boolean. Say that again? You can. So we'll see that, but so here we've got x. The length of x is five, right? So what you could do, for example, is to do, okay, let's do x. But I want x and I want to add another number to it, 12. So what I'm going to do, I'm going to take x, concatenate 12 to it. And maybe I'm going to rename that and call it y. And this is going to be y. So with a concatenate, you can always add things to a vector already. Concatenate can normally concatenate numbers and strings together, but also vectors. We'll see that, yes. The answer is yes, which is why it's really nice, but we'll see it. Okay, okay, a little exercise for you. Create a vector with the following elements, 1, 3, 10, and minus 1. And call that vector x. So you're going to create a vector x, and I want the vector x to contain 1, 3, 10, and minus 1, okay? And if you don't manage to do that, there's no break for you. So of course, the answer is in the file, but let's try to do it on your own. Okay, so we want to create a vector, we want to name it x. So we start with x and the assignment. So the left arrow like that. We want to concatenate numbers, so we're going to start with the c, okay? And I can't remember what numbers I said, I said, what was it? 1, 3, 10, minus 1, so 1, 3, 10, and minus 1, okay? So if we have created that vector with 1, 3, 10, minus 1, here's x. Now we want to take the square root of x, this is what I asked you next. So take the square root of x. Do you think you're going to have some problems if you take the square root of x? Why? Because of the minus 1. Right? Because of the minus 1. And we cannot take the square root of negative numbers. But let's try anyway. Why? Yeah, because r is clever that, as I see, it's clever enough to do things even if sometimes you shouldn't. But it's going to give you a warning, okay? So it says, oh, warning, the last number I couldn't take the square root, so I'm going to put that weird sample instead of the result, which is an, an, which means not a number, okay? It's just because the square root of negative number does not exist, so r is going to tell you, well, this is not a number. It's nice because it's still going to do it and deal with it, and you don't have to worry too much about it. It gives you the warning, but life goes on. We're going to do the same thing with the log of x, okay? Actually, I wanted to do log of 1 plus x, okay? So we want to take the log of 1 plus x. We do that, and this is what we get. Once again, everything's fine except for the last number, because 1 plus minus 1 is 0, and the log of 0 is not defined, right? But the limit is actually minus infinity. So here, r can deal with that as well, and for infinity, it's going to use inf, okay? So here are two things that we can see in our radius that when you don't have something that you shouldn't do and it doesn't give you a number, it gives you a warning, NAN, and it deals with the infinity cases. So that's kind of nice, okay? So we've seen the NAN symbol. We've seen coffee break? No, no break, huh? Okay, let's finish this line and then we'll take a break. So we've seen another number symbol. We've seen the infinity minus infinity, but in statistics or in any sort of science field where you deal with data, it's very common to have missing values, right?  Well, what do you do? You're not going to stop the trial, right? So what you're going to do is just going to mark missing value, right? You're gonna say, well, here it didn't come so it couldn't take the sample. So you need a way to deal with missing value. You need a way to tell R that there's a missing value. And the way to do that is just to code the missing value by NA. And what's nice about R is that depending on the context, it will actually provide different ways to deal with missing values. So here's the example and we're gonna look at that right after the break.


Electrified transportation is an important piece to the climate change puzzle. One of the major challenges to electric vehicles is recharging time. We'd like electric vehicles that could refuel in just a few minutes, similar to gasoline-powered vehicles. However, fast charging can be very damaging to the battery packs that power electric vehicles. Fortunately, clever ways of charging a battery, called charging protocols, can be used to minimize the damage done to the battery during fast charging. The challenge is figuring out which charging protocol to use. Battery scientists are still trying to understand how fast charging damages batteries, so we have to rely on testing each charging protocol experimentally. However, this approach is very slow and expensive because there are hundreds of protocols to try and because each experiment takes weeks to months to complete. In other words, both the time per experiment and the number of experiments make this optimization a long and expensive process. The goal of our work is to quickly find fast charging protocols that minimize damage to the battery. We use two AI methods to reduce the total testing time. The first method is early lifetime prediction, which reduces the time per experiment. This method takes data from the beginning of a battery experiment to predict the final lifetime of the battery. That way, we don't have to wait for the battery to die completely before we know how good the charging protocol is. The second AI method we use is Bayesian optimization, which helps us intelligently choose experiments. While we want to avoid testing protocols that are likely to have low lifetime, we also want to make sure we don't miss out on good ones that are very different from the ones we have tested before. Bayesian optimization helps us balance these goals to home in on high lifetime protocols. We combine these two methods to identify high lifetime charging protocols out of over 200 possibilities in around two weeks, much less than the year and a half required to test each protocol using conventional methods. What's more, the protocols that were identified as high lifetime were surprising to us, showing how AI can pick up on trends that battery scientists would not have guessed. Finally, we confirmed that the protocols from our algorithm last longer than previously used battery protocols. These methods can be used to improve other aspects of batteries, such as the materials used and the manufacturing process, allowing batteries to store more energy, become less expensive, and charge even faster. Ultimately, combining scientists' expertise with artificial intelligence can help us accelerate scientific discovery and transition to a more sustainable planet.


It's a real pleasure to join you today to celebrate five years of Pebeck, an initiative which, as you've heard, the President established in 2016 to solve a malignant problem, the problem of a business and trading environment that many agreed was hostile and difficult for local and foreign investors alike. So the long and short of the mandate of Pebeck was simply to find ways of changing the growing reputation of Nigeria as a challenging business environment. How were we to do that? It seemed quite simple to remove the bottlenecks and obstacles and to seek to change the orientation of regulatory authorities and public servants who interface with businesses seeking government licenses, approvals, and other regulatory requirements, was always going to be a difficult task. And I think Dr. Oduwale already alluded to most of those initial challenges. The public service and government agencies, of course, are notoriously settled in their ways and generally there has never been any sense of urgency in processing licenses and approvals. The attitude of course ties well with the systemic corruption and abuses that follow when public officials have a discretion in terms of the time it takes to issue approvals and who gets approvals and also where the accountability framework is weak. So interfaces with the public almost always are opportunities for rent seeking such that it had become the case that business owners had to engage consultants who helped in navigating the deliberate roadblocks for a fee. Similarly simple processes such as arrival and departures at our airports, passing through land borders, import and export processes were also difficult experiences for users of those services. So the main implication of that situation was the effect on the economy. A difficult business environment simply means fewer investors whether they be local or foreign investors and fewer jobs and fewer opportunities. So this was the task that the President gave us at the inception of Pebeck and fortunately for us we had a smart, energetic and visionary team of young people who you've seen already who stood up a few minutes ago led by Dr. Jimoke Oduwale who with this team and also of public and private sector members designed the series of reform initiatives and now internationally recognized national action plans, the 60-day accelerators designed to coordinate the effective delivery of priority reforms in select MDAs every year. At the federal level the Pebeck Secretary also actively supports 15 priority public-facing agencies and they also track 55 MDAs on the implementation of Executive Order 001 on transparency and efficiency of public service delivery and the Council's feedback mechanisms which is the report.gov.ng. We had the collaboration of several reform-minded heads of MDAs, many of whom you saw standing a few moments ago as well, who are instrumental in the development and implementation of the plans. But most notable is the sustained collaboration across all arms and levels of government including the National Assembly, the Judiciary and all sub-national governments through a partnership that we try to foster at the National Economic Council. In 2020 the work of Pebeck was further cascaded to the EBS to include local governments with the Abuja Municipal Area Council, AMAC, serving as a pilot. And I think the results have been remarkable, Pebeck since his inception has achieved the delivery of 150 reforms and completed reforms and six national action plans, the 60-day Accelerator Plan. As a result Nigeria has moved, as we've heard, an aggregate of 39 places on the World Bank Ease of Dream Business Index since 2019 and we were twice named as one of the top most improved economies in the world in the last three cycles and Nigeria has also been named one of the only two African countries to make that highly prestigious list in 2019. Similarly, the 2019 Sub-National Dream Business Report of Nigeria recorded unprecedented improvement with 100% participation of states in the right of reply exercise. The World Economic Forum in its 2018 Global Competitive Report also recognized Nigeria's business environment as one of the most entrepreneurial in the world and highlighted Nigeria's improved competitiveness in the enabling business environment space. But we're still very far from achieving our objectives and I think that has been born out also in what you've heard earlier this evening. There are several stubborn and malignant problems. There are still serious complaints about import and export delays. Just recently the agro-export businesses came for a meeting with me and they've made a strong representation on the difficulties that they're experiencing in the agro-export space and just been able to export their products. There are long waiting periods for product approvals and we still experience those long waiting periods. Most of the problems come from systemic constraints or agencies and officials sometimes who fail or resist change. But I believe that most of these problems can be solved. These systems work elsewhere and they certainly can work here. The problem sometimes as I've said is systemic. The heads of MDAs commit to change but down the line the system either resists or is simply not well designed to function properly. So we must in the coming months work with the agencies to implement a more aggressive accountability audit. And the report that we've just launched is really the first step in that direction where we identify the specific bottlenecks in the systems possibly down to the particular deaths where these problems arise. You may then come for agencies and officials who have failed or resisted such changes. But the more important thing are the systemic changes that need to take place because by and large most officials in public agencies would want to do their work well and we want to do and we want to deliver on their assignments. But sometimes the system is so convoluted that no matter what you do you end up getting the same delays. I think the last few years have proved what is possible if we're hands on and intentional in making it easy to do business in Nigeria. Unemployment in our country is over 30 percent. A minimum of three million new young people join the job market every year. Our priority as a government is to create jobs and the biggest job for our creator especially in the private sector of course is small and medium enterprises. We must ensure that they are not hindered from doing business easily so that they can produce the opportunities that our nation needs. So let me convey the appreciation of Mr. President, President Mohamed Buhari to members of the council, the Pebeck team, all MDAs and state governments for the excellent collaboration that has produced the great successes that we've had in the last five years. So let us take a moment to relish our accomplishments and leave here tonight renewed and re-energized for the work that lies ahead. Congratulations everyone and God bless you all. Thank you.


Welcome to JSA TV and JSA Podcasts, the newsroom for telecom and data center professionals. I'm Barb Mitchell, here today in beautiful Honolulu, Hawaii at PTC 2020. Joining me is Joe Milio, VP, channel and service providers for VExchange. Welcome. Thank you Barb and appreciate you taking the time to give me this opportunity to talk to, you know, the folks out there that want to learn about VExchange. Yeah and thanks for joining us and on that note, for our viewers who may not know, can you tell us a little bit about VExchange and your role at the company? Great, thank you. VExchange is, I'm going to say, relatively new company. Probably been around for about seven years now and it's really kind of the, I'm going to call the upcoming of a little company that the leadership team had worked back in the early 2000, a company called Switching Data that actually ran 34 data centers in the United States and that company effectively was sold to one of the largest now data center providers in industry equinex. Right, so the leadership team got the band, I guess, say back together again and said okay, there were some great things we did at VExchange, built a tremendous product portfolio. There were some things that, you know, we'd like to improve on from what we learned while operating though. So the leadership team got together and said okay, VExchange started off with an acquisition of one company in 2013 out on the west coast and in the past five, six years it's grown to over 14 data centers in 13 markets. So our foundation of the company is built upon probably three points, performance, reliability and innovation and that'll tie into a lot of what my responsibility is at VExchange. I'm responsible for managing our indirect channel partners so our sales agents, our resellers as well as all the service providers that effectively enable the data center in terms of the ecosystem of enterprises looking for network to enhance their applications and make them access to customer supplies and vendors. So I manage both of those because a lot of our service providers actually turn out to be tremendous partners as well because they're looking to get customers into our data center because those customers can connect to their network so now they look at saying how do we partner with VExchange to enable us and our sales teams to bring customers into the ecosystem. So on that note, on the partnerships front, you recently announced a partnership partner agreement with Tier 4. Can you tell us a little bit about that? Yeah, Tier 4 advisors is, I'll call them a neutral or independent IT advisor company, right? So their job goal is to establish the right products and services to serve the needs of their customers and the beauty of what's going on with Tier 4 is that over the past couple of years they've expanded their market footprint and their coverage and their customer base so when they looked at two things that VExchange had to offer was data centers and markets that they were moving into as they grew their business. Effectively, what we like to call growth markets. Those markets that may have been underserved by data center providers, markets like Nashville, Tennessee, Austin, Texas, Minneapolis, St. Louis, right? So when you look at a lot of the big data center providers, they weren't in that market. So now Tier 4 has a product, again, built on performance, reliability and innovation to now enable their sales teams to go out and deliver a quality product in those markets as they continue to expand. And as part of that release, I think one of the key differentiators was the insight to capabilities that it provided. Can you tell us a little bit about that? It goes back to kind of the innovation part of performance, reliability and innovation. Insight is really kind of like a data center management tool. It allows customers to have visibility into the operating infrastructure of a data center. So when you start thinking about how data centers operated with power and cooling, most of the other providers weren't able to provide that insight, basically pun intended on that. And it's like, so now tell me how much power am I using? So it allows customers to do better capacity planning. It allows customers to have access to compliance reports, which are critical in the data center industry to be able to have certain compliance certifications as whether it be HIPAA for the healthcare industry or PCI for the financial transaction community. So now those reports and those capabilities are easily delivered via insight. And then the last thing is really about audit and control. So now access to the data center is all registered and tagged. So if a company comes in or a customer wants to have access, they can set it up in insight and they can get access and then track every step along the way inside the data center. So it allows for a different kind of compliance. It's really like corporate governance. And how do I manage that corporate governance? And being so close to this space, I'm wondering if you could shed some light on your sort of thoughts, predictions maybe for where you see the industry going in relation to data centers? Yeah, I mean the industry is always in change. And you'll hear a lot of the talk about cloud first, public cloud, private cloud, multi-cloud. I think the data center at the end of the day is the foundation for all clouds. So when you think about what a cloud is, fundamentally the data center is what enables the cloud. So when we start thinking about what's going on in the hybrid cloud space where public cloud services are always going to be required for certain applications, certain workloads. However, more and more enterprise customers are realizing that the public cloud infrastructure isn't always the best from a reliability and potentially from a cost. So there's a lot of repatriation going on where early on when customers thought the public cloud was this saving grace are now realizing that's not and they're building a combined solution of leveraging data centers with bare metal infrastructure and well as augmenting it with public cloud access. So I think when we look at what's going on, hyperscalers, right, hyperconverged infrastructure and that's kind of what we look at from a partnership perspective in our channels is we look for, I'm going to call them solution builders, right? Because the end of the day the exchange does the foundation. We're like the lowest level I'll say of the OSI model and we look for partners that build up the stack. It's experts in managed routering, switching, database, storage, compute, right? So the channel says okay let me go find those builders and let's work with them so that now they can deliver an entire solution including the foundation and build up. So we have reseller relationships that allow us to do that. And so with all that in mind, what does that mean for VXchange? What do you see for 2020? I think for 2020 is going to be a tremendous year simply because of what's going on in the industry and the partnerships we're building that now allow customers to have that capability of a highly reliable data center infrastructure that has performance that's 100% availability. So therefore now more and more customers that are looking to make that shift to private public kind of solution has a company like Switch and Data in those markets on the edge. Well I had to throw out edge because everything nowadays is about talking about the edge. But the edge is really about low latency capabilities to support the eyeballs and eardrums of those applications. So markets like Nashville now are becoming critical especially from a growth if you have been to Nashville lately or Austin as a demographic the growth is wonderful so therefore there's more eyeballs and those eyeballs need lower latency. So that's where we're looking at the edge now being able to give us that capability to touch those customers. So from those things we're going to focus on filling up all our data centers, managing to supporting our channel partners that are bringing those opportunities to us and hopefully winning in the market. Fantastic and we look forward to seeing all that happen and how it all unfolds over the next year and years to come and thank you. I want to thank you for joining us again today. Thank you Barbara it was great I really appreciate you guys taking the time. Of course of course you're always welcome and thank you to you viewers for joining us today on JSA TV and JSA podcasts. Happy networking.