Displaying 20 results from an estimated 800 matches similar to: "How to convert factors to numbers"
2013 Feb 27
2
matrix multiplication
Hi,
Try this:
#mat1 is the data
res<-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i) {new1<-do.call(rbind,lapply(seq_len(nrow(mat1[-i,])),function(j) {x1<-rbind(mat1[i,],mat1[j,]); x2<-(abs(x1[1,1]-x1[2,1])*abs(x1[1,5]-x1[2,5]))+(abs(x1[1,2]-x1[2,2])*abs(x1[1,6]-x1[2,6]))+(abs(x1[1,3]-x1[2,3])*abs(x1[1,7]-x1[2,7]))+(abs(x1[1,4]-x1[2,4])*abs(x1[1,8]-x1[2,8]))}));new1}))
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
str(Empdata)
Empdata$gnipc<-as.numeric(Empdata$gnipc)
install.packages("systemfit")
library("systemfit")
pdata <- plm.data(Empdata,
2016 Apr 22
1
Unique Ordering
Hi R-Help,
data at bottom
I've been struggling with a problem where I need to order based on 1) the
Frequency "Freq" and 2) keeping each group of 3 of the same type together
"Var2" but I want across all groups it to go "high to low" based on the
earn factor.
Thank you!
structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L,
3L, 2L, 3L, 1L, 2L, 3L, 1L,
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
install.packages("systemfit")
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end.
I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis.
I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2020 Apr 17
3
Convertir lista de precios a dolares por gramo
Se ha borrado un adjunto en formato HTML...
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20200417/11369880/attachment.html>
2018 Apr 19
2
Interpretación NA's
Hola Carlos
Muchas gracias por tu respuesta.
Saludos
________________________________
De: Carlos Ortega <cof en qualityexcellence.es>
Enviado: jueves, 19 de abril de 2018 10:47:54 a. m.
Para: Javier Nieto
CC: r-help-es en r-project.org
Asunto: Re: [R-es] Interpretaci?n NA's
Pues que la peque?a variaci?n en las ventas no pueden explicarse con un precio constante.
Hay otra variable
2018 Apr 19
2
Interpretación NA's
Hola
Tal vez la pregunta que tengo tenga una respuesta muy f?cil, sin embargo lo entiendo.
Tengo una data frame que se ve as?:
R> df
semana precios ventas preciosCan
1 11724 3.512441 2 33.53
2 11726 3.512441 1 33.53
3 11727 3.512441 2 33.53
4 11728 3.512441 1 33.53
5 11729 3.512441 4 33.53
6 11730 3.512441 3 33.53
2018 May 15
0
Systemfit
... and the mailing list is picky about attachments... whatever you attached did not conform to the stringent requirements mentioned in the Posting Guide. Pasting the code right into the email is usually safest, though you DO have to post using plain text (as the Posting Guide indicates) or your code may get mangled by the automatic html format removal.
On May 15, 2018 7:04:31 AM PDT, Bert Gunter
2017 Dec 06
2
Odd dates generated in Forecasts
Dear friends,
I have a weekly time series which starts on Jan 4th, 2003 and ends on
december 31st, 2016.
I set up my ts object as follows:
MyTseries <- ts(mydataset, start=2003, end=2016, frequency=52)
MyModel <- auto.arima(MyTseries, d=1, D=1)
MyModelForecast <- forecast (MyModel, h=12)
Since my last observation was on december 31st, 2016 I expected my forecast
date to start on
2018 May 15
1
Systemfit
Unless there is good reason not to, always cc the list -- there are lots of
smarter folks than I on it who can help.
I may or may not have time to look at this. Hopefully someone else will.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
2013 May 15
4
series financieras
Buenos dias,
Tengo la siguiente duda.
Desde una hoja de calculo .xls me descargo un fichero en r as.matrix.
Time VAR_2 VAR_3 VAR_4........ VAR_N
Fechas(n) Precios Precios Precios Precios
Fechas (n-1)
¿como puedo hacer para graficar de forma ordenada (fechas) cada uno del vector columnas (son precios de activos)?
[[alternative HTML
2012 Sep 05
4
Summarizing data containing data/time information (as factor)
Dear R user
I want to create a table (as below) to summarize the attached data
(Test.csv, which can be read into R by using 'read.csv(Test.csv, header=F)'
), to indicate the day that there are any data available, e.g.value=1 if
there are any data available for that day, otherwise value=0.
28/04 29/04 30/04 01/05 02/05
532703 0 1 1
2017 Oct 14
2
Pasar cotización en pesos a dólares usando tipo cambio día hábil anterior
Estimados Usuarios-R:
Muy buenas tardes.
Tengo un listado de precios en pesos por día:
Día Precio en $
01/01/04 0,04
02/01/04 0,11
03/01/04 0,11
04/01/04 0,04
05/01/04 0,10
06/01/04 0,00
07/01/04 0,10
08/01/04 0,10
09/01/04 0,14
10/01/04 0,21
11/01/04 0,21
2017 Dec 06
0
Odd dates generated in Forecasts
> On Dec 6, 2017, at 5:07 AM, Paul Bernal <paulbernal07 at gmail.com> wrote:
>
> Dear friends,
>
> I have a weekly time series which starts on Jan 4th, 2003 and ends on
> december 31st, 2016.
>
> I set up my ts object as follows:
>
> MyTseries <- ts(mydataset, start=2003, end=2016, frequency=52)
>
> MyModel <- auto.arima(MyTseries, d=1, D=1)
2015 Jun 05
3
usar Selenium para web scraping
Hola.
Tengo que bajarme varias tablas del INE y necesito interactuar con el
navegador. Ví el fantástico post que escribió Gregorio Serrano (que la
tierra le sea leve), en
http://www.grserrano.net/wp/2014/01/relenium-el-siguiente-nivel-de-web-scraping-con-r/
y estoy intentando reproducirlo para aprender como funciona relenium
Pero relenium me da error después de
if(!require(relenium))
2017 Dec 06
1
Odd dates generated in Forecasts
Thank you very much David. As a matter of fact, I solved it by doing the
following:
MyTimeSeriesObj <- ts(MyData, freq=365.25/7,
start=decimal_date(mdy("01-04-2003")))
After doing that adjustment, my forecasts dates started from 2017 on.
Cheers,
Paul
2017-12-06 12:03 GMT-05:00 David Winsemius <dwinsemius at comcast.net>:
>
> > On Dec 6, 2017, at 5:07 AM, Paul
2008 Dec 09
2
Need help optimizing/vectorizing nested loops
Hi,
I'm analyzing a large number of large simulation datasets, and I've
isolated one of the bottlenecks. Any help in speeding it up would be
appreciated.
`dat` is a dataframe of samples from a regular grid. The first two
columns are the spatial coordinates of the samples, the remaining 20
columns are the abundances of species in each cell. I need to calculate
the species richness in
2017 Aug 07
2
unir varios archivos .csv en una serie historica
Estimados usuarios-R:
Muy buenas noches.
Tengo una serie de archivos csv que contienen los precios mayoristas de
electricidad por hora.
Cada archivo csv corresponde a un mes de un cierto año.
Cada columna corresponde a un día del mes y cada fila a una hora del día (1
a 24 horas).
¿Hay alguna forma rápida de importar todos los datos y formar un vector
columna en que cada observación
2015 Jun 05
2
usar Selenium para web scraping
Estimado José Luis Cañadas
En lo personal el trabajo de Gregorio que cita Carlos me fue de mucha ayuda, lo único que Rselenium tiene un comportamiento algo extraño, mi problema es en dos líneas, la primera sobre ejemplos que no funcionan (algo cambió), pero la importante es sobre mi trabajo, luego de horas de web scraping por alguna razón da un error, este tiene que ver con el recorrido de todas