similar to: Matching a vector with a matrix row

Displaying 20 results from an estimated 10000 matches similar to: "Matching a vector with a matrix row"

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]]
2010 Jun 11
1
Managing list elements
Hello, I have two lists with the same number of elements > tail(LHS) [[1]] [1] "antecedentes.factor_riesgo=17" "antecedentes.estado=1" "antecedentes.medio=4" "tarjetas_flagrancia.adquiriente2=" [[2]] [1] "antecedentes.riesgo=1" "antecedentes.estado=1" "antecedentes.medio=4"
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]]
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 <-
2010 Sep 26
4
Problem with unlist
Hello I want to unlist the attached element getting only the first element in each element of the list. The last element of the list looks as this: [[5065]] [[5065]]$Pluv3Meses [1] 274.4 [[5065]]$PluvMesesMedio [1] 378.2667 [[5065]]$Pluv2UltimosMeses [1] 23.33333 So I would like to get for each element of the list the element called Pluv3Meses. The whole list has 5065 elements but when I try to
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 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
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 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]]
2011 Feb 08
2
Stopping between multiple graphs
Hello. I would like to know if there is a command for stopping between multiple grpahs. I have a for in which I create a graph in each iteration. I would like R to wait for a click or an enter to pass to the next graph. Does anybody know how can this be done. 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
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
2010 Nov 22
2
Making a line in a legend shorter
Hello, I am putting a legend with lines in a line plot and I would like to make the lines in the legend shorter. Does anybody knows how to do this? Thank you Felipe Parra [[alternative HTML version deleted]]
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 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 May 31
2
Problems with apply
Hello I am tryin to use the apply functions with two data frames I've got and I am getting the following error message Error en HistRio$SecSte : $ operator is invalid for atomic vectors I don't understand why. when I use the apply I am doing: PromP <- function(HistRio,AnaQuim){ xx <- c(0,0,0) if(length(which(AnaQuim$SecSte==HistRio$SecSte))>0){ xx[1]<-1 }
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
2011 Mar 28
2
Problems installing fPortfolioSolver
Hello, I am trying to install fPortfolioSolver using the following commands and I am getting the following error: > filename [1] "C:\\Users\\Hp\\Documents\\R\\win-library\\2.12\\fPortfolioSolver_271.75.tar.gz" > > install.packages(filename, type="source", repos=NULL) ERROR: dependencies 'fEcofin', 'RlpSolve', 'RlpSolveAPI',
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 Mar 02
2
Binding a matrix to a matrix
Hello I have a 2x10x200 matrix and I would like to bind to it another 2x10 matrix in order to end up with an 2x10x2001 matrix, which command should i use in order to do this? Thank you Felipe Parra [[alternative HTML version deleted]]