I did lasso selection using lars::lars(), then I got this plot. I have no idea how to interpret it:   Could anyone provide a brief explanation? Why does it plot standardized coefficients against |beta|/max|beta|?
I am new to the glmnet package, and I am still unsure of how to interpret the results. Could anyone please help me read the following trace plot?  The graph was obtaining by running the following:  library(glmnet) return &lt;- matrix(ret.ff.zoo[which(index(ret.ff.zoo)==beta.df$date[2]), ]) data   &lt;- matrix(unlist(beta.df[which(beta.df$date==beta.df$date[2]), ][ ,-1]),                   ncol=num.factors) model  &lt;- cv.glmnet(data, return, standardize=TRUE)  op &lt;- par(mfrow=c(1, 2)) plot(model$glmnet.fit, "norm",   label=TRUE) plot(model$glmnet.fit, "lambda", label=TRUE) par(op)
Put numbers in legend using pgf pie I would like to have the numbers that are inside the pie chart to be in the legend. How can I make that happen? Here is the MWE: \documentclass{article} \usepackage{pgf-pie} \usepackage{tikz} \usetikzlibrary{shadows}  \begin{document} \begin{tikzpicture} \pie[text=legend,style=drop shadow,radius=2]{51.3/Protestant, 23.9/Roman Catholic, 3.3/Other Christian, 1.7/Jewish, 0.7/Buddhist, 0.6/Muslim, 0.4/Hindu, 1.2/Other religions, 16.1/No religion } \end{tikzpicture} \end{document}  EDIT: I also have another pie chart, where the text is quite long. How can I set the width of the text so that it wraps around before the page ends? Here is what it looks like:  I forgot that PGF-PIE was not on CTAN. Here is a link to the google source: If I have a $2\times 2$ or $3\times 3$ matrix, how should I go about computing the eigenvalues and eigenvectors of the matrix?  NB: I am making this question to provide a unified answer to questions about eigenvalues of small matrices so that all of the specific examples that come up can be marked as duplicates of this post. See . So I'm getting my listItems with a Camlquery, but i want to calculate the avg of the "price" rows  This is the code I've used so far:  function VisaLista() {     namn = document.getElementById("txtNamn");     var camlQuery = new SP.CamlQuery();     camlQuery.set_viewXml(     "&lt;Where&gt;" +     "&lt;And&gt;" +     "&lt;Eq&gt;&lt;FieldRef Name='Title'/&gt;&lt;Value Type='Text'&gt;" + namn + "&lt;/Value&gt;&lt;/Eq&gt;" +     "&lt;Or&gt;" +     "&lt;Eq&gt;&lt;FieldRef Name='Prioritet'/&gt;&lt;Value Type='Text'&gt;Hög&lt;/Value&gt;&lt;/Eq&gt;" +     "&lt;Eq&gt;&lt;FieldRef Name='Status'/&gt;&lt;Value Type='Text'&gt;Startad&lt;/Value&gt;&lt;/Eq&gt;" +     "&lt;/Or&gt;" +     "&lt;/And&gt;" +     "&lt;/Where&gt;");     listItems1 = list.getItems(camlQuery);     clientContext.load(listItems1);     clientContext.executeQueryAsync(OnSuccessVisa, OnFail); } function OnSuccessVisa() {     var listEnumerator = listItems1.getEnumerator();     var elmt = 0;     while (listEnumerator.moveNext()) {         var currentItem = listEnumerator.get_current();         elmt = (currentItem.get_item('_x0072_zb6'));          var sum = 0;         for (var i = 0; i &lt; elmt.length; i++) {             sum += parseInt(elmt[i], 10);         }          var avg = sum / elmt.length;          document.write("The sum of all the elements is: " + sum + " The average is: " + avg);     }     $("#Kategori1").text = "Medelvärdet för dessa ordrar: " + avg }   I am getting following error     "Cannot get the value length of null - at elmt, line 43 In my recent study of Artinian modules I have been looking at Prüfer $p$-groups (which I will denote by $\mathbb Z_{p^\infty}$ from now on).   I am attempting to prove that $\mathbb Z_{p^\infty}$ is an Artinian $\mathbb{Z}$-module which is not finitely generated.      To do this I am trying to show that every proper non-trivial submodule of $\mathbb Z_{p^\infty}$ is equal to $\left(\frac{1}{p^n}\mathbb{Z_{}}\right)/\mathbb{Z}$ for some $n$.   I am using the following definition of $\mathbb Z_{p^\infty}$: $$\mathbb Z_{p^\infty}=\left\{x\in \mathbb{Q}/\mathbb{Z}\mid \exists n:p^nx=0 \right\}$$ I have read in several places, Atiyah &amp; MacDonald Example 6.3 and Wikipedia to name a few, that the subgroups of $\mathbb Z_{p^\infty}$ are of this form. This would demonstrate that $\mathbb Z_{p^\infty}$ is Artinian. However, I can't seem to find anywhere a proof or example showing why all the subgroups are of this form. I would like to understand this further, as it is not immediate to me that this would be the case, but my attempts to figure out why have so far been futile. I may be thinking too much and missing a simple explanation. I have looked at starting with an arbitrary subgroup $H$ such that $H\neq 0$ and $H\neq\mathbb Z_{p^\infty}$ and seeing if I can deduce anything from that. I got this far, but it doesn't seem to be going anywhere. I have also looked at Sylow's theorems, but I'm not sure if they will be any use to me as $|\mathbb Z_{p^\infty}|=\infty$ (unless I'm wrong about this!).  I would be extremely grateful if anybody could offer a few hints here as I am slowly losing my sanity trying to figure it out!  Thanks,  Andy. Voltage Controlled Current Source integrated circuit? Exists? Does anyone know of a Voltage Controlled Current Source IC? Or do you know how I can build one with as few other components as possible taking up a minimal amount of space?  current range needed is from 0mA to 350mA Show that AB is singular if A is singular Actually I need to show that $\det(AB) = \det(A)\det(B)$ if $A$ is a singular matrix.  The determinant of $A$ is $0$ if $A$ is singular, so $\det(AB)$ has to be $0$ as well, but I have problems showing that $AB$ is singular if $A$ is singular. How can I show that? I found the following blog title without a question mark from :     How to ease Afghanistan’s progress in cricket   Is it grammatical, if we don't put question mark in questions of titles? I think this blog title should have been like this:     How to ease Afghanistan’s progress in cricket?   I also found the following blog title from  without a question mark:     Election rigging 101: How to steal a mandate   However, I found a question mark from other blog title of :     Elections 101: What is the ECP and what does it do on election day? Insect identification - Is this a bedbug? This bug was found on a couch in . The couch, and the two beds in the room show no signs of other bugs. Is this a bed bug that I should worry about or something harmless? It was slightly larger than a common tick. I commonly use the word 'guys' to refer to a group of males colloquially. It's colloquial but not rude, off putting, condescending, patronizing (though I wouldn't use it with a group of men at a board meeting (hypothetically of course), unless I knew them). So, some that I would not consider as replacements would be    buddies: too old-fashioned dudes: too informal boys: too patronizing men, gentlemen: too formal or false respect   I realized that I had also been using it for any group of people, males and females, even just females. It worked for me and I didn't think of the gender implications, that women might not care for it. No one ever complained, directly or indirectly (rule of life: sometimes people don't complain about things they should).   But it occurred to me (maybe by reading something that sparked realization) that the intended hearers might not all care for it.  What might be a female gendered or non-gendered version of 'guys'?  Some that I've considered don't feel right about (though these may be reasonable answers) are:   dolls: too old-fashioned babes: too informal  ladies: too formal or I've heard from women, too creepy women: too factual girls: too patronizing (as much as 'boys') everyone, you all: too bland y'all: perfectly non-sexist but too regional (might work, but not everywhere)   Hopefully I haven't eliminated all the possibilities -- any suggestions? Best way to find all factors of a given number How to log out user from web site using BASIC authentication? Is it possible to log out user from a web site if he is using basic authentication?  Killing session is not enough, since, once user is authenticated, each request contains login info, so user is automatically logged in next time he/she access the site using the same credentials.  The only solution so far is to close browser, but that's not acceptable from the usability standpoint. Android Min SDK Version vs. Target SDK Version Permission Denied To Delete File First of all, I'm not looking for an answer on how to remove the files. I am looking for a reason why this doesn't work - and a suggestion on how to remove the files without sudo.  I have a directory in my Desktop that has a few inner directories (don't judge the naming - I just extract what I need from files I'm given) and after getting the files I try and remove the files with rm -rf Bengal\ Tiger\ Creative/, I am surprised to see the following warning for each image.     rm: cannot remove ‘Bengal Tiger Creative/Bengal Tiger Creative/images/customer-services-landscape.jpg’: Permission denied   Below is some code outputs.  tree  nathan@nathan-pc:~/Desktop$ tree . ├── Bengal Tiger Creative │   └── Bengal Tiger Creative │       └── images │           ├── awards.jpg │           ├── blank.gif │           ├── bullet1-light-green.gif │           ├── bullet2-light-green.gif │           ├── bullet3-light-green.gif │           ├── bullet4-light-green.gif │           ├── customer-services-landscape.jpg │           ├── desktop.ini │           ├── header-img1.jpg │           ├── header-img2.jpg │           ├── header-img4.jpg │           ├── header-img5.jpg │           ├── softhr.gif │           ├── Thumbs.db │           ├── tiger_main-img1.jpg │           ├── tiger_main-img2.jpg │           ├── tiger_main-img3.jpg │           ├── tiger_main-img4.jpg │           ├── Vanquis-benefits-icons_iphone-green.gif │           └── white-arrow-green.gif   ls -laR  nathan@nathan-pc:~/Desktop$ ls -laR Bengal* Bengal Tiger Creative: total 12 drwxrwxr-x 3 nathan nathan 4096 Aug 10 11:30 . drwxr-xr-x 6 nathan nathan 4096 Aug 10 11:34 .. drwxrwxr-x 3 nathan nathan 4096 Aug 10 11:34 Bengal Tiger Creative  Bengal Tiger Creative/Bengal Tiger Creative: total 12 drwxrwxr-x 3 nathan nathan 4096 Aug 10 11:34 . drwxrwxr-x 3 nathan nathan 4096 Aug 10 11:30 .. dr-xr-xr-x 2 nathan nathan 4096 Aug 10 11:36 images  Bengal Tiger Creative/Bengal Tiger Creative/images: total 356 dr-xr-xr-x 2 nathan nathan   4096 Aug 10 11:36 . drwxrwxr-x 3 nathan nathan   4096 Aug 10 11:34 .. -rwxrwxrwx 1 nathan nathan  14910 Mar 18 12:29 awards.jpg -rw-rw-r-- 1 nathan nathan   1093 Mar 21  2014 blank.gif -rw-rw-r-- 1 nathan nathan   1978 May  8  2014 bullet1-light-green.gif -rw-rw-r-- 1 nathan nathan   1969 May  8  2014 bullet2-light-green.gif -rw-rw-r-- 1 nathan nathan   2416 May  8  2014 bullet3-light-green.gif -rw-rw-r-- 1 nathan nathan   2449 May  8  2014 bullet4-light-green.gif -rw-rw-r-- 1 nathan nathan 113138 Apr 14  2014 customer-services-landscape.jpg -r--r--r-- 1 nathan nathan    142 Mar 25 11:58 desktop.ini -rw-rw-r-- 1 nathan nathan  14312 Mar 23 11:39 header-img1.jpg -rw-rw-r-- 1 nathan nathan   1480 Mar 23 11:41 header-img2.jpg -rw-rw-r-- 1 nathan nathan   1278 Mar 23 11:41 header-img4.jpg -rw-rw-r-- 1 nathan nathan   1168 Mar 23 11:41 header-img5.jpg -rw-rw-r-- 1 nathan nathan   1703 Mar 21  2014 softhr.gif -rw-rw-r-- 1 nathan nathan  88064 Aug  4 10:39 Thumbs.db -rw-rw-r-- 1 nathan nathan  23607 Mar 23 11:56 tiger_main-img1.jpg -rw-rw-r-- 1 nathan nathan  23400 Mar 23 11:56 tiger_main-img2.jpg -rw-rw-r-- 1 nathan nathan   6970 Mar 23 11:56 tiger_main-img3.jpg -rw-rw-r-- 1 nathan nathan   8996 Mar 23 11:57 tiger_main-img4.jpg -rw-rw-r-- 1 nathan nathan    275 Jul 31  2014 Vanquis-benefits-icons_iphone-green.gif -rw-rw-r-- 1 nathan nathan   1821 Jul  9  2014 white-arrow-green.gif   Doing chmod 777 and then delete does not work.  Doing rm -rf * inside the directory does not work.  Doing sudo rm file does work.   I can easily remove these files using sudo, however, I cannot see why they cannot be removed without sudo. As a relatively new Ubuntu user, I would like to learn why.  Thanks in advance, Nathan Why bar magnet can produce magnetic field? How do you post to an iframe? How do you post data to an iframe? Why should we care about groups at all? Mobile phone battery charger I would like to know about the workings of mobile phone battery chargers. I know the basic principle, you take a transformer to bring it down to 9/6/3.7 volts then a bridge rectifier circuit and a capacitor input filter to rectify it into DC. Then you apply it to the battery. But I know this should not be enough, I need at least two things,   Protection against back current flow Switch off power when the battery is fully charged.   Can someone point me to something simple (apart from this ) Can I run OSX applications? Math Induction Proof: $(1+\frac1n)^n < n$ My Ubuntu 12.04 was normally updated through the Update Manager, something about gtk. Then I rebooted and now all that shows after the splash screen is a blue screen that only shows the cursor.