Displaying 20 results from an estimated 5000 matches similar to: "recode letters to numbers"
2008 May 17
1
Recode
Hi!
Using recode in cars package, I tryed to use the following:
recode(data$nrcomp, "lo:5='0 to 5'; 5:hi='bigger than 5'")
I got:
Erro em parse(text = strsplit(term, "=")[[1]][2]) :
unexpected end of input in "'0 to 5"
When I try only numbers, or only text, it's ok, but when I try to combine
numbers and text, I got a error...
Any help?
2010 Apr 21
5
Bugs? when dealing with contrasts
R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with
2010 Aug 26
3
Passing data to aov
Hello Again Gurus and Lurkers:
I?m trying to build a very user-friendly function which does aov without
having the user type in a formula (which would be tedious in this case).
The idea is to take the response from a PCA score matrix, and the factors
from a list. A simple example is the function given below, along with test
data and a sample call to the function.
I'm certainly having
How to use PC1 of PCA and dim1 of MCA as a predictor in logistic regression model for data reduction
2011 Aug 17
4
How to use PC1 of PCA and dim1 of MCA as a predictor in logistic regression model for data reduction
Hi all,
I'm trying to do model reduction for logistic regression. I have 13
predictor (4 continuous variables and 9 binary variables). Using subject
matter knowledge, I selected 4 important variables. Regarding the rest 9
variables, I tried to perform data reduction by principal component
analysis (PCA). However, 8 of 9 variables were binary and only one
continuous. I transformed the data by
2010 Dec 06
10
R crashes when making graphs
hi,
i am running R with JGR and Deducer under Ubuntu Mint Lucid. since i updated to R 2.12 i can no longer make graphs - R just crashes.
the full error report was posted to launchpad (https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/675905) without any success so far.
anyone with a similar problem or helpful suggestions?
thanks!
kat
2010 Nov 17
2
Problem with plotting diagnostics - Error in object$coefficients : $ operator is invalid for atomic vectors
hi all,
after fitting a multiple linear regression
model <- lm(y ~ a + b+ c+d)
i wanted to plot diagnostics
plot(model)
but get the error message
Error in object$coefficients : $ operator is invalid for atomic vectors.
which does not make a lot of sense, since there is no "$" - i am working with an attached dataset.
can anyone help, please??
thanks a lot,
kat
2009 May 19
3
Remove objects names like character String
Hi,
how can I use rm() on objects named like:
paste("site",i,"_data",sep="") while looping
through i?
I tried rm(paste("site",i,"_data",sep="")) but I get the error that
rm() must contain names or
text strings which is confusing me as I thought paste() would create
something like that...?
Thanks,
Katharina
--
Time flies
2006 Dec 08
5
Remove " from a string
Hi all!
I have lots of functions called in the following pattern
'NameOfFunctionNumber' where the name always stays the same and the number
varies from 1 to 98.
Another function which I run in advance returns the number of the function
which has to be called next.
Now I want to combine 'NameOfFunction' with the 'Number' returned so that i
can call the desired function.
I
2009 Aug 12
1
CCF for hourly time series?
Hello,
I have a dataframe containing various time series (not time series objects though!)with hourly time steps. I?d like to perform ccf for I need to know the correlation factors for different lags.
Here is an example:
x<-as.POSIXct(c("2008-12-25 16:00:00", "2008-12-25 17:00:00", "2008-12-25 18:00:00", "2008-12-25 19:00:00", "2008-12-25
2006 Nov 07
2
wrong fill colors in polygon-map
Dear all,
I would like to produce a map with information about the patenting
activity in German districts, by coloring districts with different
degrees of patenting activity in different colors. I work with the
packages maptools, maps and spdep. The map data is read from an external
.shp file (+ the corresponding .shx and .dbf files). Plotting a map with
the IDs or the patenting indicator itself
2009 Jun 17
3
lattice: axis ticks, axis alignment and remove axis from plot
Hi there,
I'm a bit confused concerning the axis tck setting in the lattice
package as the ticks on left sided axis aren't
drawn at all with the following setting:
dados <- data.frame(varsep = factor(rep(1:2,10)),
i = runif(20))
library(lattice)
my.theme <- list(
axis.components = list(left = list(tck = 1, pad1 = 1, pad2 =
2), top = list(tck = 0, pad1
2009 Jun 24
3
distinguish regression lines in grouped, black and white lattice xyplot
Hi,
I've got the following problem which I cannot think of a solution right now:
if got a lattice xyplot in black and white and a grouping variable
with many (more than 8
values) and I plot it as regression lines (type="r"), just like this
one (not reproducable but that's
I guess not the point here):
xyplot(log(AGWB) ~ log(BM_roots), data=sub_agwb_data, groups=species,
2010 Mar 18
5
language!!!
Hi,
there´s something that really bothers me about R and after hours and hours of internet research, I´m still stuck with the same problem: I installed R and it is in Spanish, as the system on my work. I would really like it in English and there seems to be no way to change that!?! I´m doing an abroad internship, so my Spanish is far from perfect and my tutorial is in English.
Is there any
2009 May 19
2
create string of comma-separated content of vector
Hi,
how do I create a string of the comma-separated content of a vector?
I've got the vector i with several numeric values as content:
>str(i)
num 99
and want to create a SQL statement to look like the following where
the part '(2, 4, 6, 7)' should be
the content of the vector i:
select * from [biomass_data$] where site_no in (2, 4, 6, 7)
Here my approach (which doesn't
2009 Aug 08
1
linear model: Test difference between coefficients and given values (t.test?)
Hi there,
I've got a question which is really trivial for sure but still I have
to ask as I'm not
making any progress solving it by myself (please be patient with an
undergraduate
student):
I've got a linear model (lm and lmer fitted with method="ML").
Now I want to compare the coefficients (slope, intercept, not the
random effects)
of both models with a given value (e.g.
2012 Jun 06
2
package zoo, function na.spline with option maxgap -> Error: attempt to apply non-function?
Hello,
I'm trying to use na.spline (package zoo) to fill some missing data in a time series.
this works fine, however, if I apply the 'maxgap' argument, I always get the error:
<------
Error in na.spline.vec(x., coredata(object.), xout = xout., ...) : attempt to apply non-function
------>
I couldn't find a similar error for this case in the mailing lists and zoo vignette,
2007 Nov 12
2
separate window for help/newbie
hi,
is there a way to make r open the help file in a separate window?
i'm quite new to linux(kubuntu) and used to work with r under windows...
thanks,
katharina
2009 May 22
1
regrouping factor levels
Hi all,
I had some trouble in?regrouping factor levels for a variable. After some experiments, I have figured out how I can recode to modify the factor levels. I would now like some help to understand why some methods work and others don't.
Here's my code :
rm(list=ls())
###some trials in recoding factor levels
char<-letters[1:10]
fac<-factor(char)
levels(fac)
print(fac)
##first
2010 Apr 25
1
How to assign scores to rows based on column values
Hi,
I'm trying to assign a score to each row which allow me to identify which
rows differ. In the example file below, I've used "," to indicate column
separators. In this example, I'd like to identify that row 1 and row 5 are
the same, and row 2 and row 4 are teh same.
Any help much appreciated. Also, any comments on what the command lines do
would be fantastic.
Thanks!!
2009 Jun 01
1
write values of points beside points in plot
Hi everyone,
is it possible to write a certain value beside a point in a plot?
I'm plotting the following:
plot(coefficient$intercept ~ coefficient$average_BM_leaves_needles,
main="intercepts ::: BM_leaves_needles",
ylab="intercepts", xlab="average BM_leaves_needles per site [kg]")
and I want to have the value of coefficient$site_no written beside
each