search for: ekbrand

Displaying 18 results from an estimated 18 matches for "ekbrand".

Did you mean: brand
2010 Sep 30
7
how to make list() return a list of *named* elements
...=my.c) > str(my.list) List of 2 $ b : num [1:5] 22.4 12.2 10.9 8.5 9.2 $ my.c: int [1:5] 11 8 6 9 20 Now, is there a way to get list() (or some other function) to automatically name the elements? I often use list() in return(), and I am getting tired of having to repeat myself. -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> A. Because it breaks the logical sequence of discussion Q. Why is top posting bad? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Dig...
2008 Feb 19
3
simple usage of "for"
...} > And there is no output at all, just a new prompt. I added a print statement just to check the loop construct, and it seems to work. > for (i in 2:length(meriter)) { print(i); table(meriter[[1]], meriter[[i]]) } [1] 2 [1] 3 [1] 4 But I get no tables :-( What do I do wrong? -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> GPG Fingerprint: 1408 C8D5 1E7D 4C9C C27E 014F 7C2C 872A 7050 614E -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Digital signature U...
2010 Apr 29
2
getting random integers
I want 100 integers. Each integer, x, can be in the range 1 =< x => 10. Does the following code give 1 and 10 the same chances to be selected as 2:8? round(runif(100, min = 1, max = 10)) -- Hans Ekbrand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100429/5eeb7e8f/attachment.bin>
2012 Feb 25
5
which is the fastest way to make data.frame out of a three-dimensional array?
...t 1 2 3 4 5 6 7 8 9 10 ... $ y : int 1 1 1 1 1 1 1 1 1 1 ... $ temp : num 0.673 -1.178 0.54 0.285 -1.153 ... (In the real world problem I had, data was monthly measurements of temperature and x, y was coordinates). Does anyone care to share a faster and less ugly solution? TIA -- Hans Ekbrand
2009 Apr 29
3
how to word-wrap text in labels in plots?
...t;a not so important value", "baz"), class = "factor") plot(c) Is there a way to get the long variable labels to automatically wrap so that all labels can be shown? Alternatively, is there a way to get the labels truncated, possibly with ".." appended? -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> Q. What is that strange attachment in this mail? A. My digital signature, see www.gnupg.org for info on how you could use it to ensure that this mail is from me and has not been altered on the way to you. -------------- next part --...
2007 Nov 01
2
ploting a comparison of two scores, including the labels in the plot
...t of functions for ploting and I am new to R, I would like advise on what packages/functions that should be used to get what I want (if what I want is possible to achieve with R, if it is not, then please let me know). Sample code is, of course, also very much appreciated. kind regards, -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> A. Because it breaks the logical sequence of discussion Q. Why is top posting bad? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Dig...
2011 Mar 31
1
Cluster analysis, factor variables, large data set
...e distance matrix must be done by another function since clara only works with numeric data. Is there an alternative to the daisy -> clara route that does not require as much RAM? What functions would you recommend for a cluster analysis of this kind of data on large data set? regards, Hans Ekbrand
2009 Feb 17
1
frequency table for multiple variables
...ar1 var2 var3 1 3 1 4 2 2 2 3 3 2 2 3 4 4 4 NA 5 4 3 5 6 2 2 3 7 3 4 3 How can I get R to convert this into the following? Value 1 2 3 4 5 var1 0 3 2 2 0 var2 1 3 1 2 0 var3 0 0 4 1 1 TIA, -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> Q. What is that strange attachment in this mail? A. My digital signature, see www.gnupg.org for info on how you could use it to ensure that this mail is from me and has not been altered on the way to you. -------------- next part --...
2009 Apr 08
1
read.spss, locale and encodings
...et: Error in read.spss("wo.sav") : error reading system-file header In addition: Warning message: In read.spss("wo.sav") : wo.sav: position 143: Variable name begins with invalid character This is under Debian GNU/Linux, the stable release. foreign is version 8.27 -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> GPG Fingerprint: 1408 C8D5 1E7D 4C9C C27E 014F 7C2C 872A 7050 614E -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature U...
2012 Mar 10
2
Issues in installing rgl in Mac OS 10.6.8
Dear All, I am trying to install rgl on my mac notebook from the source file. I tried using: /usr/bin/R64 CMD INSTALL rgl_0.92.798.tar.gz and get the following error message: checking for X... no configure: error: X11 not found but required, configure aborted. ERROR: configuration failed for package ?rgl? * removing ?/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl? *
2011 Aug 09
1
need your consult
Dear Sir/Madam Hi. I am a general paediatrician, and I have read *some* chapters of the following books(1-3). I think SPSS lacks some features that may be important in data analysis (for example: interval of correlation coefficient in bivariate normal distribution, PRESS, and MSPR in cross-validation). I am thinking about changing SPSS to R: 1. SPSS is very expensive for me to update.
2009 Apr 07
0
Converting a whole dataframe (including attributes) from latin1 to UTF-8
...ed as such by read.spss (and/or not defined as such in SPSS, but since SPSS respects the numeric values of the factors anyway, users don't need to) Rather than hack around b) too, I wonder if anyone on the list know how to convert a whole data.frame from latin1 encoding to utf8? TIA -- Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net> A. Because it breaks the logical sequence of discussion Q. Why is top posting bad? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Dig...
2009 Apr 08
1
Student
Hi, I have problem. In the function below (test and test2) i want the function test not to print the variable data but i want the function test2 to use the variable test$data. This is the creation of the variable data: > matrice=c(1:10) > matrice=matrix(matrice,nrow=5,ncol=2) This is the function test: > test=function(data){ + return(list(x=5,data=data)) + } This is the function
2012 Mar 09
2
How do I force confint() for glm() to be quiet?
I need confint() for glm() to supress the messages "Waiting for profiling to be done..." because they mess up the caching mechanism of pgfSweave (see https://github.com/cameronbracken/pgfSweave/issues/40). I have read the help page of confint(), but I do not know how to get the help page for the glm() version, if any such help page exists. Is there a general way of turning of output
2011 Aug 09
1
lavaan: how to analyse residuals of a latent variable
....girl + priviledged.parents + school.adaption + school.grades " library(lavaan) con <- url("http://code.cjb.net/temp/lavaan.temp.RData") print(load(con)) close(con) my.fit <- sem(my.model, data = my.crim.set) summary(my.fit, fit.measures = T, standardized = T) -- Hans Ekbrand Department of Sociology University of Gothenburg Sweden -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110809/3d71e...
2008 Mar 03
3
Plot using colors
Dear R users, I have a problem since I try to plot my datas with different colors. plot(tvar, var, xlab="zeit [s]",ylab="Variation [%]", col = ifelse(var <= varstability, 'green','red')) this works well! But since I add a type="l" to my plot, it will color all the plot with green!!! Is there any solution? I avoid to use teachingDemos. Thanks. --
2012 Mar 10
3
function input as variable name (deparse/quote/paste) ??
Hi all Say I have a function: myname=function(dat,x=5,y=6){ res<<-x+y-dat } for various input such as myname(dat1) myname(dat2) myname(dat3) myname(dat4) myname(dat5) how should I modify the 'res' line, to have new informative variable name correspondingly, such as dat1.res dat2.res dat3.res dat4.res dat5.res stored in the workspace. This is only an example of a complex
2012 Mar 02
3
speed up merge
Hello, I have a nasty loop that I have to do 11877 times. The only thing that slows it down really is this merge: xx1 = merge(dt,ua_rd,by.x=1,by.y= 'rt_date',all.x=T) Any ideas on how to speed it up? The output can't change materially (it works), but I'd like it to go faster. I'm looking at getting around the loop (not shown), but I'm trying to speed up the merge first.