Displaying 20 results from an estimated 800 matches similar to: "Problem with unlist"
2010 Sep 16
1
Problems creating a Panel
Hello, I am trying to create a panel with the attached data frame. using the
following code:
> PanelRio = DataRiopaila[which(duplicated(DataRiopaila$SEC_STE)==T),]
> PanelRio=plm.data(PanelRio,index=c("SEC_STE","FechaSiembra"))
series
Pluv3Meses,PluvMes4al10,Pluv2UltimosMeses,Rad3Meses,RadMes4al10,Rad2UltimosMeses
are NA and have been removed
It tells me it removes
2011 Apr 05
1
Help in splitting a list
Dear R users,
Let's say I have a list with components being 'm' matrices (as exemplified
in the "mylist" object below). Now, I'd like to subset this list based on an
index vector, which will partition each matrix 'm' in 2 sub-matrices. My
questions are:
1. Is there an elegant way to have the results shown in mylist2 for an
arbitrary number of matrices in mylist?
2010 Feb 23
2
Importing a file to r
Hello
I am trying to import the attached file Curva LIBOR to R. I am trying to use
the following commands and obtaining the following errors
> res <- read.xlsx("C:\\Users\\FELIPE
PARRA\\Documents\\Quantil\\Federacion\\Curva LIBOR.xlsx", 4)
Error en .jcall(rowCells[[ic]], "I", "getColumnIndex") :
RcallMethod: invalid object parameter
> res <-
2013 Mar 13
2
holding argument(s) fixed within lapply
|Hello,
Given a function with several arguments, I would like to perform an
lapply (or equivalent) while holding one or more arguments fixed to some
common value, and I would like to do it in as elegant a fashion as
possible, without resorting to wrapping a separate wrapper for the
function if possible. Moreover I would also like it to work in cases
where one or more arguments to the original
2012 Sep 11
2
splines package
Hello all,
I have been working with b-splines and noted that the splines package is
not available in CRAN. Does any body know what happened with it?
Or, is there any package that replaces it?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Dec 15
6
Numbers in a string
Hello, I have stings which have all sort of characters (numbers, letters,
punctuation marks, etc) I would like to stay only with the numbers in them,
does somebody know how to do this?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2011 Apr 03
1
Help in splitting ists into sub-lists
Dear List,
Let's say I have a list whose components are 2 matrices (as exemplified in
the "mylist" object below). I'd like to create a list with components being
4 matrices based on an logical index vector. is there a way to simplify what
I'm doing to obtain the results in "mylist2"? I'd like something that would
work on an arbitrary number of elements in
2010 Nov 22
4
Rexcel
Hello I am new to RExcel and I would like to run a source code form the
excel worksheet. I would like to run the following code
source("C:\\Quantil Aplicativos\\Genercauca\\BackwardSelectionNC.r")
from the excel wroksheet. Does anybody know how to do this?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Sep 29
2
boxplot
Hello, does somebody know in a boxplot, what does each element in the
boxplot represent?
1. lines at the extremes of the dotted lines?
2. Extremes of the boxes
3. Black line in the middle of the box?
4. notches?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 May 12
3
Calling a list element
Hello, i have the following list
strsplit(as.character(Elecciones$Municipios),"\\.")
[[1]]
[1] "ANTIOQUIA" "ABEJORRAL"
[[2]]
[1] "META" "ACACIAS"
[[3]]
[1] "CASANARE" "AGUAZUL"
[[4]]
and I would like to make a vector of the first element of each of the list
items, in this case ANTIOQUIA, META, CASANARE, etc . Do you know how
2011 Apr 09
1
Memory allocation problem
Hello, I am runnning a program on R with a "big" number of simulations and
I am getting the following error:
Error: no se puede ubicar un vector de tamaƱo 443.3 Mb
I don't understand why because when I check the memory status in my pc I get
the following:
> memory.size()
[1] 676.3
> memory.size(T)
[1] 1124.69
> memory.limit()
[1] 4000
which should in theory allow to
2010 Feb 19
4
Accessing values of a matrix
hello all,
thank you for taking the time
I have a matrix A that have column names (let say n columns), I want to
reduce the matrix to have just a few of those column (p colums, this is
trivial), but for the lines I want only the lines such that A(i,J) is part
of a list (J is fixed and known)
I am sure it is very easy but I don't find it (I tryed which but it doesn't
seem to work)
Surely
2013 May 15
1
Problem with convergence in optim
Hello to all,
I have been using an optim with the following call:
optim(param_ini,fun_errores2,Precio_mercado=Precio,anos_pagosE2=anos_pagos,control=list(maxit=10000,reltol=1e-16))
depending on the intial values I'm getting the same solution but once I get
the convergence message=10 (no convergence) and for the others I get
convergence message = 0
Solution1:
$par
beta1
2011 Mar 09
2
trunc function
Hello. I would like to know if there exists in R a function like trunc but
where i can choose how many decimal places can I stay with in the number I
have (sort of the same as the trunc function in excel). I would like, for
example if I have the number 0.974678 and I choose to stay with 3 decimal
places to have as ouput 0.974.
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2008 Sep 16
2
casting a character vector as an object
Greetings,
I need to compare the ratios of vector sizes like this:
length(object1) / length(object2)
I have many vector objects to compare, so I would like to do it in a loop.
I created a loop like this:
mat1 <- matrix()
for (i in 1:6)
{
for (j in 1:6)
{
mat1[i,j] <- length( paste("object",i,sep="")) /
2011 Mar 28
1
portfolioBacktest in fPortfolio
Hello. I am trying to use the portfolio backtesting function in fPortfolio
package, but I don't now why in my version of fPortfolio I don't have either
the portfolioBactest nor the portfolioBacktesting functions. Does anybody
knows what might be going on?
thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Apr 05
1
predict.lm
Hello I am trying to use predict.lm, but I am having trouble getting out of
sample predictions. I am getting the same output if I use the following
three commands:
predict(ModeloLineal,predictors[721:768,])
predict(ModeloLineal,predictors[1:768,])
predict(ModeloLineal)
where ModeloLineal is the output from ModeloLineal<-lm(dataTS[,6] ~
predictors[1:720,]), so the first 720 observations of
2011 Mar 24
1
Problems with predict in fGarch
Hello. I am using fGarch to estimate the following model:
Call:
garchFit(formula = fmla, data = X[, i], trace = F)
Mean and Variance Equation:
data ~ arma(1, 1) + garch(1, 1)
Conditional Distribution:
norm
Coefficient(s):
mu ar1 ma1 omega alpha1 beta1
-0.94934 1.00000 -0.23211 54.06402 0.45709 0.61738
Std. Errors:
based on Hessian
Error Analysis:
2011 Apr 22
2
Matching a vector with a matrix row
Hello I am trying to compare a vector with a Matrix's rows.The vector has
the same length as the number of columns of the matrix, and I would like to
find the row numbers where the matrix's row us the same as the given vector.
What I am doing at the moment is using apply as follows:
apply(Matrix,1,function(x)all(x%in%LHS))
but this isn't too fast actually. I would like to know if
2011 Mar 04
1
Problems with a function warning
Hello. I have the following funtion:
fechasEntrega = function(FechasEntrega,fecha){
if(length(which(FechasEntrega<fecha))>0){
tkmessageBox(title = "Error en Fecha de Valoracion",message="Hay una
fecha de entrega anterior a la fecha de valoracion. Todas las fechas de
entrega deben ser posteriores a la fecha de valoraciĆ³n para el correcto
funcionamiento del