[R] graph together 4 series after HP filter

2016-09-06 Thread Sebastian Kruk
Dear R-users: Let's see if you can help. I have an matrix of class "ts" of 100 rows by 4 columns which called PP. In each column I have the time series of quarterly GDP from 4 countries. They applied the Hodrick -Prescott filter and now I want to plot simultaneously cyclical component of the 4

[R] Help with list

2013-09-26 Thread Sebastian Kruk
I have a list that gives me the number of occurrences of numbers 1, 2, 3 and 4. Sometimes a single in a casa just appears 0 and 1, in others only 2, and every combination you can think of. Eg > Caso [1:2] $ `9` 0 1 2 10 $ `13` 0 2 2 4 Can I turn it into a matrix consisting of 4 colum

[R] Creating the Spatial Weights

2013-08-19 Thread Sebastian Kruk
Dear R-users, I have a shape file (.shp, sbx, .sbn, .shx and .dbf). Can I create the Spatial Weights inside R? Thanks, Sebastián. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

[R] columns called X rename Y

2013-01-18 Thread Sebastian Kruk
I have a data. frame to which you want to change the names to some of their columns. For example: > seba <- data.frame ('constant' = 3, 'numbers' = 1: 10, 'letters' = LETTERS [1:10], otros = 2:11) List their names: > names (Seba) [1] "constant" "numbers" "letters" I want to rename c the column

[R] error reading xlsm file with read.xls

2012-12-04 Thread Sebastian Kruk
Dear all, I cannot reading a .xlsm file using read.xls. I executed: read.xls("resultados.xlsm", colNames = TRUE, sheet = 1, type = "data.frame", from = 1, rowNames = NA, colClasses = "character", checkNames = TRUE, dateTime = "numeric", naStrings = NA, stringsAsFactors = F) Error: Call("ReadXls

[R] join 2 .sav

2012-03-09 Thread Sebastian Kruk
Dear R-users, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] temporal disaggregation

2011-08-15 Thread Sebastian Kruk
Dear R-users, I have an anual info of gross product and I would like to disaggregate to trimestral data. Can I import a matlab library of Quilis? ( http://www.mathworks.com/matlabcentral/fileexchange/24438-temporal-disaggregation-library ) Thanks, Sebastián. ___

[R] Import big xml data

2011-07-13 Thread Sebastian Kruk
Dear R users, I would like to import a big xml file. I don't want to learn about xml structures, just to import all the data to a data frame. How can I do it? Thanks, Sebastián. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

[R] invert order

2010-09-01 Thread Sebastian Kruk
Dear R-help list users, I have a huge vector of numbers, how I can invert orden? For example x <- 1:1000 I would like to obtain x_r <- 1000:1 Thanks, Sebastian. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

[R] mean by year of ts object

2010-08-11 Thread Sebastian Kruk
Dear R-help list users, I have a ts object and I would like to make a new one that contain mean by year. Is there a direct way of do it? Thks, Sebastián. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Analysing CPI inflation by the fractionally integrated ARFIMA-STVGARCH model

2010-07-19 Thread Sebastian Kruk
Hi, are there any library to estima a fractionally integrated ARFIMA-STVGARCH model? You can read about it in http://www.greqam.fr/IMG/working_papers/2008/2008-36.pdf Thanks, Sebastián. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] can't open file

2010-07-08 Thread Sebastian Kruk
>> I tried: >> >> L <- readLines(con <- file("log2.log", encoding="UCS-2LE") >> z <- read.zoo(textConnection(L), index = 1:2,FUN = function(x) >> paste(x[,1], x[,2])) >> >> Error: >> Error en x[, 1] : número incorreto de dimensiones >> >Please provide a reproducible example like this: >library(zo

Re: [R] can't open file

2010-07-07 Thread Sebastian Kruk
On Wed, Jul 7, 2010 at 9:16 AM, Sebastian Kruk > wrote: >> I have a text file log2.log encoded Ansi in Windows. >> >> When I execute: >> >> out <- read.zoo(readLines(con <- file("log2.log", >> encoding="UCS-2LE")),FUN = as.chron) >&

Re: [R] can't open file

2010-07-07 Thread Sebastian Kruk
I tried: L <- readLines(con <- file("log2.log", encoding="UCS-2LE") z <- read.zoo(textConnection(L), index = 1:2,FUN = function(x) paste(x[,1], x[,2])) Error: Error en x[, 1] : número incorreto de dimensiones __ R-help@r-project.org mailing list https:

Re: [R] can't open file

2010-07-07 Thread Sebastian Kruk
)), class = "zoo") I tried: z <- read.zoo(textConnection(L), index = 1:2,FUN = function(x) paste(x[,1], x[,2])) I have de following error: Error en x[, 1] : número incorreto de dimensiones 2010/7/7 Henrique Dallazuanna : > > You've tried this? > > out <- read.zoo(&

[R] can't open file

2010-07-07 Thread Sebastian Kruk
I have a text file log2.log encoded Ansi in Windows. When I execute: out <- read.zoo(readLines(con <- file("log2.log", encoding="UCS-2LE")),FUN = as.chron) have errors: Error en file(file, "rt") : no se puede abrir la conexión Además: Mensajes de aviso perdidos 1: In file(file, "rt") : sólo f

[R] gsub with regular expression

2010-06-25 Thread Sebastian Kruk
If I have a text with 7 words per line and I would like to put first and second word joined in a vector and the rest of words one per column in a matrix how can I do it? First 2 lines of my text file: "2008/12/31 12:23:31 numero 343.233.233 Rodeo Vaca Ruido" "2010/02/01 02:35:31 palabra 111.111.22

Re: [R] extract date time from a text file

2010-06-18 Thread Sebastian Kruk
Thanks, yes, I would like to do it in one try. I a have a text file called archivo where every line is like that: "2007-12-03 13:50:17 Juan Perez" ("yy-mm-dd hh:mm:ss First Name Second Name") My code is it: datos <- read.delim(archivo,header=FALSE,sep= " ",dec=".", col.names=c("date","

[R] extract date time from a text file

2010-06-18 Thread Sebastian Kruk
I a have a text file where every line is like that: "2007-12-03 13:50:17 Juan Perez" ("yy-mm-dd hh:mm:ss First Name Second Name") I would like to make a data frame with two column one for date and the other one for name. When I use read.delim it was transformed in a data frame with 4 colums. By

Re: [R] improvement

2010-05-17 Thread Sebastian Kruk
For example if nombreC <- nombreC <- c("Juan", "Carlos", "Ana", "María","Mario") I do not want as a result: name index 1 Juan 1 2 Juan 5 3 Carlos 2 4Ana 3 5 María 4 6 Mario 0 I want: name index 1 Juan 1 2 Juan 5 3 Carlos 2 4Ana 3

Re: [R] improvement

2010-05-16 Thread Sebastian Kruk
Hi, if i just want a vector filled with names which has length(index) > 0. For example if nombreC <- c("Juan", "Carlos", "Ana", "María") nombreL <- c("Juan Campo", "Carlos Gallardo", "Ana Iglesias", "María Bacaldi", "Juan Grondona", "Dario Grandineti", "Jaime Acosta", "Lourdes Serrano") I would

[R] web mining

2010-05-15 Thread Sebastian Kruk
hi r-help list users I wonder if there is a web mining package? Thanks, Sebastián. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provi

Re: [R] Count cases in a list

2010-05-10 Thread Sebastian Kruk
unc1) > names(a) <- nombreC > a > > > Contact > Details:--- > Contact me: tal.gal...@gmail.com |  972-52-7275845 > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > ww

Re: [R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
t;- nombreC > a > > > > > Contact > Details:--- > Contact me: tal.gal...@gmail.com |  972-52-7275845 > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > www.r-statistics.com (E

Re: [R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
2010/5/8 Tal Galili : > Hi Sebastian, > Please check if this does what you want: > > nombreL <- c("Alvaro Perez", "Sebastián García", "Luis Gomez", "Jorge Rial", > "Ronaldo Apud", "Ana María Bianco") > nombreC <- c("Alvaro", "Ana","Jorge","Ronaldo", "Sebastian") > func1 <- function(x) > { > grep(x,

Re: [R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
Hi, for example I have two list: nombreL <- c("Alvaro Perez", "Sebastián García", "Luis Gomez", "Jorge Rial", "Ronaldo Apud",..., "Ana María Bianco") nombreC <- c("Alvaro",..., "Ana",...,"Jorge",...,"Ronaldo", "Sebastian",...) and my code is: cuenta <- 0 topL <- length(nombreL) topC <- length(no

[R] Count cases in a list

2010-05-08 Thread Sebastian Kruk
Hi everybody, I would like to count how many times names in list L, nombreL, apear in list C, nombreC. Can I improve the next program? cuenta <- 0 topL <- length(nombreL) topC <- length(nombreC) for (i in 1:topL) { for (j in 1:topC) {

Re: [R] drop last character in a names'vector

2010-04-30 Thread Sebastian Kruk
re using a different >> vector for nchar than you are subsetting. >> >> -- >> Gregory (Greg) L. Snow Ph.D. >> Statistical Data Center >> Intermountain Healthcare >> greg.s...@imail.org >> 801.408.8111 >> >> >>> -Original

[R] drop last character in a names'vector

2010-04-30 Thread Sebastian Kruk
Hi, i have a vector filled with names: [1] Alvaro Adela ... [25] Beatriz Berta ... ... [10] ... I would like to drop last character in every name. I use the next program: for (i in 1:10) {                           largo <- nchar(names[i]-1)                           names[i] <- substri

Re: [R] import file formatted RFC-822

2010-04-24 Thread Sebastian Kruk
I used it but for example: > robots2[74] [1] "\"Teoma\" or \"Ask Jeeves\" or \"Jeeves\"" It wasn't sorted. Sebastian. 2010/4/14 Barry Rowlingson : > On Wed, Apr 14, 2010 at 6:20 PM, Sebastian Kruk > wrote: >> I have a problem,

Re: [R] import file formatted RFC-822

2010-04-14 Thread Sebastian Kruk
I have a problem, In a few cases "robot-exclusion-useragent" have 2 or more values, is there a manner to fix it? For example, robot askjeeves has three names. 2010/4/13 Barry Rowlingson : > On Tue, Apr 13, 2010 at 6:26 PM, Sebastian Kruk > wrote: >> Dear R-list users:

Re: [R] import file formatted RFC-822

2010-04-14 Thread Sebastian Kruk
Barry, thank you so much! It's work. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducib

[R] import file formatted RFC-822

2010-04-13 Thread Sebastian Kruk
Dear R-list users: I would like to import a database of web robots, http://www.robotstxt.org/db/all.txt, it´s formatted RFC-822, ¿how can I do it? The RFC 822 specification defines a standard format for electronic messages, which consists of a set of header fields and an optional body. The header

[R] reading web log file into R

2009-09-22 Thread Sebastian Kruk
If I have a web log file as follows: #Software: Microsoft Internet Information Services 5.0 #Version: 1.0 #Date: 2007-12-03 13:50:17 #Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-bytes cs-bytes time-taken cs(User-Agent) cs(Cookie) cs(Referer) "2007