Dear r-helpers,
I am looking for an R-equivalent for the eval-function in javascript which
can
interpret a string as code on runtime, thereby allowing things like
for (i in c(1:2))
{
eval(items + "i") <- read.csv(eval(filename+ i), dec=",");
}
which would execute (with filename="testfile"):
i
;testfile%s"
> lapply(sprintf(fileName, 1:2), read.csv, dec = ",")
>
> On Wed, Feb 10, 2010 at 5:28 PM, Chaehan So wrote:
> > Dear r-helpers,
> >
> > I am looking for an R-equivalent for the eval-function in javascript
> which
> > can
&
Dear R-helpers,
my little function below calculates the group score (tmpGroupMean) of an
item,
appends a "_mean" on its name and stores its value on this name.
However, it does not calculate the mean of these scores (LVMean) in the same
row correctly,
as you can see in the below output which stran
mes)
{
doSomethingWith(currentName)
}
}
On Wed, Feb 10, 2010 at 11:34 PM, David Winsemius wrote:
>
> On Feb 10, 2010, at 5:12 PM, Chaehan So wrote:
>
> Thank you, it works for the first problem!
>>
>> Yet for the second problem, how can I solve that in one dataframe (here:
>>
Dear Joe -
that was wonderful :-)
-Chaehan
On Thu, Feb 11, 2010 at 12:44 AM, Joe Cheng wrote:
> On Wed, Feb 10, 2010 at 3:37 PM, Chaehan So wrote:
>
>> how can I access currentName in my loop - evaluated as a variable although
>> it is a string?
>>
>
> I think yo
Dear r-helpers,
why do I get an output in the first iteration of the for-loop
which contains the string values of the input vector,
and how can I avoid that?
Here's the output (only line 1 is wrong)
latentVariable Indiv Group
1 rPlanning rIterat rTDD
2 rPlanning0.79 0.84
3
e), groupingVariable)
result <- rbind(result,data.frame(latentVariable=currentName,
Indiv=tmp1,Group=tmp2))
}
return(result)
}
On Thu, Feb 11, 2010 at 3:31 AM, jim holtman wrote:
> It doing exactly what you asked it to do. You have the assignment:
>
> result <- latentVar
calculateGroupCronbach(get(latentVariableNames[i]),
> groupingVariable)
> }
>
> result <-
> data.frame(latentVariable=latentVariableNames,Indiv=tmp1,Group=tmp2)
>
> names(result) <- c("latentVariable", "Indiv", "Group")
> result
Dear r-helpers,
I am getting a mismatch error between two variables:
svp <- ksvm(x, y, type="nu-svc")
Error in .local(x, ...) : x and y don't match.
and I suspect that it might be due to missing index in the y variable which
I defined as:
y <- (LVvar[,1])
I tried various methods to make
ns
LV <- c("rPerform","rCoordCap", "rKnowGrow", "rGoalcom", "rSupport",
"rOpcomm", "rT2Cadap" )
# creates a dataframe
LVvar <- na.omit(loopLV_IndexScores(LV, u_proj))
x <- (LVvar[,-1])
y <- (LVvar[,1])
svp <- ks
structure(40L, .Names = "40", class = "omit"), class =
> > "data.frame")
> >
> >
> >
> > >
> > > PLEASE do read the posting guide
> > > http://www.R-project.org/posting-guide.html<http://www.r-project.org/
> >
11 matches
Mail list logo