Displaying 20 results from an estimated 10000 matches similar to: "Adding two different factors to one observation?"
2012 Mar 07
4
Column with codes
Good Day,
I have a small question, I think it is simple to solve,
I have a column with the following records
name
saucer
cup
tea
saucer
saucer
what is the quickest way to create a new column codes
1
1
3
1
1
--
View this message in context: http://r.789695.n4.nabble.com/Column-with-codes-tp4452906p4452906.html
Sent from the R help mailing list archive at Nabble.com.
2017 Jun 12
3
count number of stop words in R
Hi all,
Is there a way in R to count the number of stop words (English) of a string using tm package?
str="Mhm . Alright . There's um a young boy that's getting a cookie jar . And it he's uh in bad shape because uh the thing is falling over . And in the picture the mother is washing dishes and doesn't see it . And so is the the water is overflowing in the sink . And the
2017 Jun 12
0
count number of stop words in R
You can use regular expressions.
?regex and/or the stringr package are good places to start. Of
course, you have to define "stop words."
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Jun 12, 2017 at 5:40
2011 Oct 09
1
help with using last observation carried forward analysis for a clinical trial please
Hi,
I have a series of id's with multiple visits and questionnaire scores. This
is a clinical trial that will be analyzed using the last observation carried
forward method. In other words, in order to comply with intent to treat
analysis when many subjects withdraw, data points for the last visit must be
generated and filled in with the last observation. The ultimate goal is to
tabulate the
2005 Jul 01
5
Generating correlated data from uniform distribution
Dear R users,
I want to generate two random variables (X1, X2) from uniform
distribution (-0.5, 0.5) with a specified correlation coefficient r.
Does anyone know how to do it in R?
Many thanks!
Menghui
2004 Nov 21
3
Help with ooplot(gplots) and error bars
Dear All
I am trying to graph a proportion and CI95% by a factor with ooplot (any
other better solution ?)
It works well until I try to add the confidence interval.
this is the error message and and a description of the data:
> dat1
PointEst
TT1 1 3.6
TT2 2 5.0
TT3 3 5.8
TT4 4 11.5
TT5 5 7.5
TT5 6 8.7
TT7 7 17.4
> dat2
2003 Nov 14
4
LOCF - Last Observation Carried Forward
Hi!
Is there a possibilty in R to carry out LOCF (Last Observation Carried Forward) analysis or to create a new data frame (array, matrix) with LOCF? Or some helpful functions, packages?
Karl
---------------------------------
Gesendet von http://mail.yahoo.de
Schneller als Mail - der neue Yahoo! Messenger.
[[alternative HTML version deleted]]
2017 Jun 12
3
count number of stop words in R
You can define stop words as below.
data <- tm_map(data, removeWords, stopwords("english"))
Patrick Casimir, PhD
Health Analytics, Data Science, Big Data Expert & Independent Consultant
C: 954.614.1178
________________________________
From: R-help <r-help-bounces at r-project.org> on behalf of Bert Gunter <bgunter.4567 at gmail.com>
Sent: Monday, June 12, 2017
2011 Apr 03
1
zoo:rollapply by multiple grouping factors
# Hi there,
# I am trying to apply a function over a moving-window for a large
number of multivariate time-series that are grouped in a nested set of
factors. I have spent a few days searching for solutions with no luck,
so any suggestions are much appreciated.
# The data I have are for the abundance dynamics of multiple species
observed in multiple fixed plots at multiple sites. (I total I
2017 Jun 12
3
count number of stop words in R
define your string as whatever object you want:
data <- "Mhm . Alright . There's um a young boy that's getting a cookie jar . And it he's uh in bad shape because uh the thing is falling over . And in the picture the mother is washing dishes and doesn't see it . And so is the the water is overflowing in the sink . And the dishes might get falled over if you don't fell
2008 May 11
1
Finding unmatched data between two dataframe using several factors
Hi R users
I am trying to find unmatched data from two dataframes. I would like to
find unmatched data based on several factors. For the following data:
dat1 <- data.frame(x = paste("A", 1:6, sep=""),
y = c("andy","bob","ciaran","dan", "eion",
"fred"))
dat1
dat2
2017 Jun 12
0
count number of stop words in R
Thanks for your reply. I know the command
data <- tm_map(data, removeWords, stopwords("english"))
removes English stop words, I don't know how should I count stop words of my string:
str="Mhm . Alright . There's um a young boy that's getting a cookie jar . And it he's uh in bad shape because uh the thing is falling over . And in the picture the mother is
2017 Jun 12
0
count number of stop words in R
Defining data as you mentioned in your respond causes the following error:
Error in UseMethod("tm_map", x) :
no applicable method for 'tm_map' applied to an object of class "character"
I can solve this error by using Corpus(VectorSource(my string)) and the using your command but I cannot see the number of stop words in my string!
On Monday, June 12, 2017 8:36
2002 Jan 09
2
Creating subsets with factors
Hi all,
I don't understand the following output. I've created a data subset from
a data frame by
> p1.sub <- subset(p1.dat, vp!="p1")
this is ok. But
> attach(p1.sub)
> vp
[1] p1ab p1ab p1ab p1ab p1ab p1br p1br p1br p1br p1br p1kf p1kf p1kf
p1kf p1kf
[16] p1mg p1mg p1mg p1mg p1mg p1mw p1mw p1mw p1mw p1mw
Levels: p1 p1ab p1br p1kf p1mg p1mw
shows me that the
2010 Feb 14
2
xyplot, overlay two variables on one plot with group factors
All
I want to overlay two variables on the same plot following their appropriate
grouping. I have attempted to use subscripting in panel with panel.xyplot,
but I can't get the grouping to follow into the panel...here is an
example...
dat<-data.frame(
y= log(1:10),
y2=10:19,
x=1:10,
grp = as.factor(1)
)
dat2<-data.frame(
y= log(10:19),
y2= 20:29,
x=1:10,
grp = as.factor(c(2))
)
2009 Sep 15
2
precision multi-page printing
I am at a point where I will need to print checks in an application.
I guess the best way to describe this is that I am using pre-printed
checks and that I want to hit the prescribed areas with my text output.
Should I be doing something like PDF output like pdf-writer or other or
can I possibly do this with html and css?
My output will be check runs of many checks with 1 page per check.
Any
2013 Apr 24
1
matching observations and ranking
Hi,
It is not that clear.
If VAR1 is a match between columns AB001A, AB0002A, VAR2? between AB001A, AB362 and VAR3 between AB0002A and AB362:
Also, I assume row8 match would be taken as 1.
dat1<- read.table(text="
? S.No AB001A AB0002A AB362
?? 1?? -/-??????? C/C?? A/A???????????????????????
??? 2?? C/C??????? C/C?? A/A???????????????????????
??? 3?? C/C??????? C/C??
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the
plot. If executed one line at a time, there is not a problem. If I
execute the function, though, I get:
Error in ans[[1]] : subscript out of bounds
This always occurs after the second lines command, and doesn't happen
with all of my data points (some do not have errors). Any ideas?
Thanks,
Sean
2012 Dec 14
1
format.pval () and printCoefmat ()
Hi List,
My goal is to force R not to print in scientific notation in the sixth column (rel_diff - for the p-value) of my data frame (not a matrix).
I have used the format.pval () and printCoefmat () functions on the data frame. The R script is appended below.
This issue is that use of the format.pval () and printCoefmat () functions on the data frame gives me the desired results, but coerces
2008 Jul 11
1
Suggestion: 20% speed up of which() with two-character mod
Hi,
by replacing 'll' with 'wh' in the source code for base::which() one
gets ~20% speed up for *named logical vectors*.
CURRENT CODE:
which <- function(x, arr.ind = FALSE)
{
if(!is.logical(x))
stop("argument to 'which' is not logical")
wh <- seq_along(x)[ll <- x & !is.na(x)]
m <- length(wh)
dl <- dim(x)
if (is.null(dl)