Displaying 20 results from an estimated 600 matches similar to: "Sweave and " object of type 'closure' is not subsettable" error"
2013 Feb 04
10
duda con lmer. Añadir predictor a nivel de grupos
Hola a todos.
Estoy utilizando la función lmer del paquete lme4 para ajustar un modelo
mixto.
Tengo varias variables en mi data.frame, unas son a nivel individual y
otras a nivel de comarcas. Listo algunas.
ingre_6 : Ingresos (nivel individual)
iscs_a : un indicador sintético resumen de otras variables, calculado
mediante componentes principales.
sau_com : superficie agraria útil de cada una
2011 Jan 31
4
Select rows with distinct values in a column and other conditions
My data frame looks like:
SightingID PA1 PA2 PlotID InOverlap Area1 2001 1 -99 392 Y 0.22 2002 1 -99 388 Y 0.253 2008 1 NA 104 N 0.344 2010 1 NA 71 N 0.185 2012 1 NA 61 N 0.166 2013 1 NA 61 N 0.227 2014 1 NA 62
2018 Feb 10
2
Optimizar función
Buenas para tod en s, tengo una consulta para poder optimizar tiempos. Ejemplo
tengo el siguiente dataframe:
distrito<-c("A","A","A","B","B","B","C","C","C","A","A","B","B","C")
2009 Nov 24
1
Pregunta sobre LM
Hola Buen día,
estoy ajustando una regresión multiple, pero sucede que tengo un factor de
expanción,
digamos que deseo ajustar el modelo
ingreso ~ edad + ocupacion
mi problema es que cada observación tienen un factor de expanción, es decir
cada variable no representa una observación sino más, que no es un número
fijo para cada observación.
por lo que a mí se me ocurrio usarlas como peso
2011 Jan 20
4
How to reshape wide format data.frame to long format?
Dear list,
I need to convert this data.frame
> names(codesM)
[1] "key" "AMR.pa1.M" "AMR.pa2.M" "AMR.pa3.M" "AMR.pa4.M"
[6] "AMR.pa5.M" "AMR.pa6.M" "AMR.pa7.M" "AMR.pa8.M" "AMR.pa9.M"
[11] "AMR.pa10.M" "AMR.ta1.M" "AMR.ta2.M" "AMR.ta3.M"
2009 Apr 15
2
How to extract p-value into a table from a groups of t test
Hi,
I have run a groups of t test and obtained a list of the t-test results
(about 30). How do I extract p-values from the 30 t-test results and make a
table output? Thanks
Jun
Example t-test output:
============================
$Lambda_z
Welch Two Sample t-test
data: x[PA1.BS.DN$Onecode == 2] and x[PA1.BS.DN$Onecode == 3]
t = -0.1128, df = 33.635, p-value = 0.9109
alternative
2008 May 21
2
Search a string and modify it in a .txt file
Hi there,
I use R and I would like to be able to modify a file .txt "init_file" like this one :
# ---------------------------------------------------------------------------- #
# Parameters A
# ---------------------------------------------------------------------------- #
# Parameter 1
PA1 = 15
# Parameter 2
PA2 = 3
# Parameter 3
PA3 = 2
#
2012 Dec 07
1
how to add a column from another dataset with "merge"
kiotoqq wrote
> I want to add a shorter column to my dataset with the function "merge",
> it
> should be filled with NAs wo be as long as the other colums, like this:
>
> id age
> 9 46
> 8 56
> 6 52
> 5 NA
> 4 NA
> 3 NA
> 1 NA
>
> i did this:
> pa1 <- merge(pa1, an1, by="mergeid")
>
> and it says
2012 Oct 28
1
Tabular datos de Encuesta Continua de Hogares
Buenas, tengo la siguiente inquietud.
Tengo un data frame con los microdatos de la ECH de mi pais. He realizado un cuadro sin problemas en excel pero me gustaria una rutina de R para poder generar la tabla. El data.frame se llama ECH2009. Cuenta con las siguientes variables para este caso:
idhogar region estrato integranteshogar expansor ingpercapsvl Computador TvAbonado Internet
1 capital 1 2
2015 Jun 09
5
librerias para programar una interfaz grafica en R ?
Estimados, he estado mirando en la internet si es posible programar con
R una interfaz grafica para pedir el ingreso de datos por ejemplo, pero
invariablemente obtengo paginas que hablan de interfaces graficas
(rkward, rstudio, r-commander, etc) para R o de las librerias para hacer
graficos (ggpolt, lattice, etc) ... alguien me puede orientar donde
buscar o si estas existen ?
Saludos y
2013 Mar 06
3
almacenamiento en lista y funcion lapply
Estimados su ayuda, tengo un total de 20 matrices las cuales deseo
colocarlas como componentes de la lista, es decir
matrices<-list(matriz1,matriz2,matriz3,...,matriz20) existe alguna manera
de hacer esto de manera automatica ya que puede que exista un mayor numero
de matrices por ejemplo 100, donde el ingreso de una por una puede resultar
un poco cansado.
A su vez a las matrices ingresadas
2009 Aug 01
2
Add columns in a dataframe and fill them from another table according to a criteria
Deare R users
I am new to R.
What I want to do is explained below;-
I have table called States.Prob which is given below:-
This table gives the probabilities of the changes in the swap curve
depending on the state of the swap curve. I want to put these probabilities
in my dataframe mydata(given after the prob table).
Prob of States
Changes State1 State2 State3 State4
a
2010 Jan 14
1
Error: object of type 'closure' is not subsettable
Hi everyone,
Would somebody please explain (or point me to a reference that explains)
the following error:
"Error: object of type 'closure' is not subsettable"
I was trying to use rep() to replicate a function:
> example_function <- function() { return(TRUE) }
> rep(example_function, 3)
Error: object of type 'closure' is not subsettable
But I just cannot
2012 Nov 27
1
Problem in Starting R Server - object of type 'closure' is not subsettable
Hi All,
I am trying to start R Server to run some Java Script in my local machine
using the library, 'Rook'. I use Windows 7.
And my codes are following,
> library(Rook)
> myD3dir <- 'D:\\STUDIES\\Java script\\d3-master'
> s <- Rhttpd$new
> s$start(quiet=TRUE)
and i get the following error for the above line,
Error in s$start : object of type
2011 Apr 11
0
Package fgui returns error: Object of type closure is not subsettable
Hello All,
I have written three functions.
First: To input user specified SAS dataset and plot the boxplots of relevant
variables.
Second: Extract the number of hours, minutes etc. from a variable describing
a time-point using regular expressions.
E.g. 'Per1, Day 2, 24 Hour' would be separated into three
columns, Per (value 1), Day (value 2) and Hour (value 24)
Third:
2009 Dec 20
3
Object of type 'closure' not subsettable
Hi all,
How can I overcome the error "object of type 'closure' not subsettable"
I ran the following script
seq <- paste(seq(1914, 1916, by=1), "*.y", sep=".") # make sequence
c <- 3 # total number of files
d2 <- file # creates dummy file
# Input sequence in loop
for (i in 1:3){
list <- list.files("~/ukcp09/txt/x.djf", seq[[i]])
file
2013 Mar 14
1
error: object of type 'closure' is not subsettable
Hi all,
when i run this script:
>read.table("Angelika.txt",header=T,sep="\t")
>mytable=read.table("Angelika.txt",header=T,sep="\t")
>for ( dye in c("A","B","C","F","G","K","L","M"))
+ {
+ for (cond in 1:8)
+ {
+ measurement =
2008 Aug 27
5
Integrate a 1-variable function with 1 parameter (Jose L. Romero)
Hey fellas:
I would like to integrate the following function:
integrand <- function (x,t) {
exp(-2*t)*(2*t)^x/(10*factorial(x))
}
with respect to the t variable, from 0 to 10.
The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44.
I have tried Vectorize to no avail.
Thanks in advance,
jose romero
2009 Apr 29
1
R Macro Question
Dear all,
I am a new R user, and I have a question about R macro.
Here is the situation, I want to do item option analysis (options include: A
, B, C, D), below is the codes for option A analyses.
#option A analyses
optiona<-mat.or.vec(nrow(responsedata2), ncol(responsedata2))
# create A matrix by recoding
for (i in 1:ncol(responsedata2)){
2011 Aug 18
3
Error message: object of type 'closure' is not subsettable
Dear R-users
I need to calibrate kappa, rho, eta, theta, v0 in the following code, see
below. However when I run it, I get:
y <- function(kappahat, rhohat, etahat, thetahat, v0hat) {sum(difference(k,
t, S0, X, r, implvol, q, kappahat, rhohat, etahat, thetahat, v0hat)^2)}
> nlminb(start=list(kappa, rho, eta, theta, v0), objective = y, lower =lb,
> upper =ub)
Error in dots[[1L]][[1L]] :