search for: aa_

Displaying 10 results from an estimated 10 matches for "aa_".

Did you mean: aa
2017 Dec 04
3
Dynamic reference, right-hand side of function
...nally solved it with the (eval(as.name()) function (I include the loop I used below). I understand that looping isn't kosher among you more devoted R-users, and eventually I hope I will learn to use lists in the future instead. Thanks! Love for (year in 2000:2007){ varname <- paste0("aa_",year) assign(paste0(varname), as.vector(eval(as.name(varname)))) } -----Ursprungligt meddelande----- Fr?n: peter dalgaard [mailto:pdalgd at gmail.com] Skickat: den 4 december 2017 16:39 Till: Love Bohman <love.bohman at sociology.su.se> Kopia: r-help at r-project.org ?mne: Re: [R] Dyn...
2017 Dec 04
3
Dynamic reference, right-hand side of function
...nd a fairly advanced Stata-user, I guess part of my problem is that my mindset (and probably my language as well) is wrong. Anyway, I have what I guess is a rather simple problem, that I now without success spent days trying to solve. I have a bunch of datasets imported from Stata that is labelled aa_2000 aa_2001 aa_2002, etc. Each dataset is imported as a matrix, and consists of one column only. The columns consists of integer numbers. I need to convert the data to vectors, which I found several ways to do. I use, for example: aa_2000 <- as.numeric(aa_2000[,1]) However, when trying to automa...
2017 Dec 04
0
Dynamic reference, right-hand side of function
The generic rule is that R is not a macro language, so looping of names of things gets awkward. It is usually easier to use compound objects like lists and iterate over them. E.g. datanames <- paste0("aa_", 2000:2007) datalist <- lapply(datanames, get) names(datalist) <- datanames col1 <- lapply(datalist, "[[", 1) colnum <- lapply(col1, as.numeric) (The 2nd line assumes that the damage has already been done so that you have aa_2000 ... aa_2007 in your workspace. You mig...
2017 Dec 04
0
Dynamic reference, right-hand side of function
...ame()) function (I include the loop I used below). I understand that looping isn't kosher among you more devoted R-users, and eventually I hope I will learn to use lists in the future instead. > > Thanks! > Love > > > for (year in 2000:2007){ > varname <- paste0("aa_",year) > assign(paste0(varname), as.vector(eval(as.name(varname)))) > } > > -----Ursprungligt meddelande----- > Fr?n: peter dalgaard [mailto:pdalgd at gmail.com] > Skickat: den 4 december 2017 16:39 > Till: Love Bohman <love.bohman at sociology.su.se> > Kopia: r...
2017 Dec 04
2
Dynamic reference, right-hand side of function
...ame()) function (I include the loop I used below). I understand that looping isn't kosher among you more devoted R-users, and eventually I hope I will learn to use lists in the future instead. > > Thanks! > Love > > > for (year in 2000:2007){ > varname <- paste0("aa_",year) > assign(paste0(varname), as.vector(eval(as.name(varname)))) > } > > -----Ursprungligt meddelande----- > Fr?n: peter dalgaard [mailto:pdalgd at gmail.com] > Skickat: den 4 december 2017 16:39 > Till: Love Bohman <love.bohman at sociology.su.se> > Kopia: r-...
2017 Dec 04
0
Dynamic reference, right-hand side of function
...e the loop I used below). I understand that looping isn't kosher among you more devoted R-users, and eventually I hope I will learn to use lists in the future instead. >> >> Thanks! >> Love >> >> >> for (year in 2000:2007){ >> varname <- paste0("aa_",year) >> assign(paste0(varname), as.vector(eval(as.name(varname)))) >> } >> >> -----Ursprungligt meddelande----- >> Fr?n: peter dalgaard [mailto:pdalgd at gmail.com] >> Skickat: den 4 december 2017 16:39 >> Till: Love Bohman <love.bohman at sociolo...
2017 Dec 05
3
Dynamic reference, right-hand side of function
...thing we Stata-users do, I just jokingly pointed it out). Anyway, I'm really happy that you try to teach me some R-manners. Since I still get questions about what the h**k I mean by my strange question, I sort it out with an example: I had a number of matrices, named in a consecutive manner: aa_2000 <- as.matrix(read.csv(text="1,0,1,1,0,0,0,0,0,0,1,0,0", header=FALSE)) aa_2001 <- as.matrix(read.csv( text="0,0,0,1,0,1,1,0,0,0,0,1,0,0", header=FALSE)) aa_2002 <- as.matrix(read.csv( text="1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0", header=FALSE)) I needed them to...
2017 Dec 05
0
Dynamic reference, right-hand side of function
...jokingly pointed it > out). Anyway, I'm really happy that you try to teach me some R-manners. > Since I still get questions about what the h**k I mean by my strange > question, I sort it out with an example: > > I had a number of matrices, named in a consecutive manner: > > aa_2000 <- as.matrix(read.csv(text="1,0,1,1,0,0,0,0,0,0,1,0,0", > header=FALSE)) > aa_2001 <- as.matrix(read.csv( text="0,0,0,1,0,1,1,0,0,0,0,1,0,0", > header=FALSE)) > aa_2002 <- as.matrix(read.csv( text="1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0", > header=...
2018 Jul 17
0
Dovecot Quota and subject utf-8
...t? e?s, ?d vim ipsum tant?s expet?ndis. Ut pr? vidit di?it iudicabit, cum ?t ??mm?do Subject of a delivered message: Subject: =?UTF-8?Q?Qu=C3=AAm_cas=C3=A9_erat_vim_id=2C_vix_=C3=ADn_dicit_p?= =?UTF-8?Q?ut=C3=A2nt=2C_minim_=C3=A7=C3=B3nsequuntur_ea_i=C3=BAs=2E_Agam_?= =?UTF-8?Q?cet=C3=AAro_t=C3=AA_e=C3=B4s=2C_=C3=A1d_vim_ipsum_tant=C3=A2s_e?= =?UTF-8?Q?xpet=C3=AAndis=2E_Ut_pr=C3=B5_vidit_di=C3=A7it_iudicabit=2C_cum?= =?UTF-8?Q?_=C3=BAt_=C3=A7=C3=B4mm=C3=B3do?= Subject of a message rejected with Dovecot Quota: Subject: Rejected: =?UTF-8?Q?Qu=C3=AAm_cas=C3=A9_erat_vim_id=2C_vix_=C3=ADn_dicit...
1997 May 12
0
R-alpha: ISO-latin-1 characters in strings -- print.default & PARSE(?) problems
....accents ISO24x <- "¡¢£¤¥¦§ ¨©ª«¬­®¯" #octal 241..257 ISO26x <- "°±²³´µ¶· ¸¹º»¼½¾¿" #octal 260..277 ##--- THIS IS a Problem: It gives a SYNTAX error ! ISOdiv <- "×÷ Ðð Ññ Þþ ßÿ" ##-- One of these characters even was producing the same as 'q()' !! aa_ function(x) { x^2 ##- frenchquotes <- "«...»" ## <<...>> ##- Umlaute <- "äöü ÄÖÜ" # = "a "o "u "A "O "U ##- A.accents <- "àáâãäåæ ÀÁÂÃÄÅÆ" # `a 'a ^a "a oa ae `A 'A ^A "A oA AE ##- EI.acc...