Displaying 20 results from an estimated 1000 matches similar to: "read.table - reading text variables as text"
2011 Feb 28
1
Creating new variables. How do you get them into a data frame?
Hi
I'm an R newbie. I can't seem to add new variables to data frames. Here are
the stages
(1) I import the data using read.csv.
(2) I fix it using fix(data)
(3) I create a new variable using
spos<-tagPOS(stim,language="en",model=NULL,tagdict=NULL).
(tagPOS is a function in the OpenNLP toolkit, which tags a string for part
of speech. "stim" is a variable in the
2012 May 18
1
Natural Language Toolkit for R - is it still there?
Hi
I used the package Natural Language Toolkit about a year ago to parse
strings into parts of speech. However, I cannot find it on CRAN.
Has it been withdrawn?
Thanks
Nick
--
Lecturer in Speech and Language Pathology
Room 1.9
King George VI Building
Queen Victoria Road
University of Newcastle-upon Tyne
NE1 7RU
0191 222 8720
[[alternative HTML version deleted]]
2005 Nov 29
3
Reclassifying values within a vector to several other values
Dear List
Apologies for such a simple question:
I have a vector of 738 elements, coded with values between 1 and 16 (but
not containing 7, 10, 11 or 13) and wish to recode value 14 to 1, 4 to 2, 1
to 3, 2 to 4 and all other values to 5. I've been trying to use the
replace function (in base) and %in%, but without success.
Many thanks
Roy
2004 Apr 06
1
Storing p-values from a glm
Hi,
for example one could do it this way:
v <- summary(fit)$coefficients[,4]
the coefficient attribute is a matrix, and with the "4" you refere to the
pvalue (at least in lm - don't know if summary(glm) produces sligthely
different output).
to skip the intercept (1st row): v <- summary(glmfit)$coefficients[-1,4]
hope this helps,
Arne
--
Arne Muller, Ph.D.
2003 Nov 27
1
lagsarlm - using mixed explanatory variables (spdep package)
Hello
I'm very new to R (which is excellent), so apologies if this has already
been raised. In the spdep package, I'm trying to undertake an
autoregressive mixed model using the lagsarlm function. This is working
fine, but there does not appear to be a method of including an explanatory
variable without it automatically being included as a lagged term. I'm
after something along the
2009 May 15
1
Plotting question re. cuminc
Hello everyone,
(This is my second question posted today on the R list).
I am carrying out a competing risks analysis using the cuminc function...this takes the form:
cuminc(ftime,fstatus,group)
In my study, fstatus has 3 different causes of failure (1,2,3) there are also censored cases (0). "group" has two levels (0 and 1).
I therefore have 6 different cumulative incidence curves:
2005 Mar 21
2
Violin plot for discrete variables.
Dear Rgurus,
To my knowledge the best way to visualize the distribution of a discrete
variable X is
plot(table(X))
The problem which I have is the following. I have to discrete variables
X and Y which distribution I would like to compare. To overlay the
distribution of Y with lines(table(Y)) gives not satisfying results.
This is the same in case of using density or histogram.
Hence, I am
2006 Sep 29
1
Helmert contrasts for repeated measures and split-plot expts
Dear R-help
I have two separate experiments, one a repeated-measures design, the other
a split-plot. In a standard ANOVA I have usually undertaken a
multiple-comparison test on a significant factor with e.g TukeyHSD, but as
I understand it such a test is inappropriate for repeated measures or
split-plot designs.
Is it therefore sensible to use Helmert contrasts for either of these
designs?
2009 Nov 15
1
Problem building package for R 2.10.0 on Mac OS X
Hi
I have submitted a package (rioja) to CRAN. It checks OK for all R versions and OS's except r-release-macosx-ix86 where it fails when checking the examples. Specifically, it fails because R can't find the package vegan which is needed in a function. Here is the snippet from the check results:
### Begin snippet
checking examples ... ERROR
Running examples in 'rioja-Ex.R'
2005 Mar 03
3
Need suggestions for plotting 3D plot
Hi Everybody,
I am a newbie in R. I have a data in the form of a
matrix which I want to make some 3D plots using R.
There is some functions for instance hist() for 2D
plots, but I cant find any function for 3D plots. Is
there any function available in R for 3D plots? If so,
is there any documention available on internet so that
I can go through.
With regards,
Soumyadeep
2007 Nov 26
1
Unweighted meta-analysis
Hello
I'm very much a beginner on meta-analysis, so apologies if this is a
trivial posting. I've been sent a set data from separate experimental
studies, Treatment and Control, but no measure of the variance of effect
sizes, numbers of replicates etc. Instead, for each study, all I have
is the mean value for the treatment and control (but not the SD). As
far as I can tell, this forces
2007 Jul 17
1
fit a nonlinear model using nlm()
I am trying to fit a nonlinear model using nlm().
My application of nlm() is a bit complicated.
Here is the story behind the model being fit:
The observer is trying to detect a signal corrupted by noise.
On each trial, the observer gets stim=signal+rnorm().
In the simulation below I have 500 trials. Each row of stim is a new trial.
On each trial, if the cross-correlation between the stim and
the
2005 Mar 09
3
Plotting several series on one set of axes
Dear All,
I am rather rusty with my R, but I recall being able to do something like
plot(x1,...);plot(x2,add=TRUE,...)
to plot two series on the same axes.
Any suggestions how this may be done will be appreciated.
2012 Aug 31
2
Conditional merging in R & if then statement
1)I am wandering how the following SQL statement can be written in R language
w/o using sqldf:
create table detail2 as
select a.*
from detail a,
pdetail b
where a.TDATE=b.TDATE
and (a.STIM >= b.STIM and a.STIM <=b.MAXTIM)
2) when try if then in R it only applies to the 1st row & not to whole
dataset like in SAS. How do you get round that?
in SAS:
data summary;
set all1;
1999 May 19
1
shell command
Using R (version 0.63.3) for MS windows, I try the following command
> shell(paste("cd ",getenv("RHOME"),sep=""))
which replies with an error message
Too many parameters - FILES\RW0633
which appears to suggest that the space if the path name is causing
difficulties to the cd command. getenv returns
> getenv("RHOME")
RHOME
2005 Nov 16
1
Problem with R.2.2 "No rule to make target `d:/prog/r/rw2011/include/R.h"
Dear R-devlopers,
I removed yesterday the R.2.1. installation from windows NT laptop and I
am getting the following error when building a pacage with R.2.2
---------- Making package msbase ------------
adding build stamp to DESCRIPTION
making DLL ...
make[3]: *** No rule to make target `d:/prog/r/rw2011/include/R.h',
needed by `llogic.o'. Stop.
....
I have no idea from where
2010 May 25
1
Centos 5.4 to 5.5 fails to update lvm2 (needs newer device-mapper?)
Updating from centos 5.4 to 5.5 using an update rather than a rebuild, I get the following complaint from yum:-
lvm2-2.02.56-8.el5_5.1.x86_64 from setup has depsolving problems
--> Missing Dependency: device-mapper >= 1.02.39-1 is needed by package lvm2-2.02.56-8.el5_5.1.x86_64 (setup)
This is from a local mirror, so checking the upstream feed in case the mirroring is incomplete I see
2006 Feb 20
1
Nested AIC
Greetings,
I have recently come into some confusion over weather or not AIC
results for comparing among models requires that they be nested.
Reading Burnham & Anderson (2002) they are explicit that nested
models are not required, but other respected statisticians have
suggested that nesting is a pre-requisite for comparison. Could
anyone who feels strongly regarding either position
2012 Dec 02
1
Repeated-measures anova with a within-subject covariate (or varying slopes random-effects?)
Dear all,
I am having quite a hard time in trying to figure out how to correctly
spell out a model in R (a repeated-measures anova with a
within-subject covariate, I guess). Even though I have read in the
posting guide that statistical advice may or may not get an answer on
this list, I decided to try it anyway, hoping not to incur in
somebody's ire for misusing the tool.
For the sake of
2011 Oct 05
4
SPlus to R
I'm trying to convert an S-Plus program to R. Since I'm a SAS programmer I'm not facile is either S-Plus or R, so I need some help. All I did was convert the underscores in S-Plus to the assignment operator <-. Here are the first few lines of the S-Plus file:
sshc _ function(rc, nc, d, method, alpha=0.05, power=0.8,
tol=0.01, tol1=.0001, tol2=.005, cc=c(.1,2),