On Mon, 30 Dec 2013 20:42:53 -0500
David Parkhurst wrote:
> I have several variables in a data frame that aren't listed by ls()
> after I attach that data frame. Where did they go, and how can I
> stop the hidden ones from masking the local ones?
> Thanks for any help.
> David
>
You really nee
On Tue, 31 Dec 2013 19:51:06 -0500
Gabor Grothendieck wrote:
...
>
> The assignment operator is TWO characters: a less than sign
> immediately followed by a minus sign. Try copying and pasting this:
>
> x <- 3
> x
>
Actually, you can use the = sign as well.
X = 3
works the same as
X <- 3
Dear Listserve,
I have a data-parsing question for you. I recognize this is more in the domain
of PERL/Python, but I don't know those languages! On the other hand, I am
pretty good overall with R, so I'd rather get the job done within the R
"ecosphere."
Here is what I want to do. Consider the
Hi Jim,
Thank you, it works indeed :)
Luca
2014/1/2 Jim Lemon
> On 01/02/2014 05:17 PM, Luca Meyer wrote:
>
>> Happy new year fellows,
>>
>> I am trying to do something I believe should be fairly straightforward but
>> I cannot find my way out.
>>
>> My dataset d2 is 26 rows by 245 columns, e
Hi
you are confusing yourself and maybe other audience.
With ls() you list objects in your environment (usually stored in .RData file)
and loaded with starting R.
Let me guess. You probably have 2 data frames All8 and All8Sites. They have
some variables inside and you can see structure of any
On 14-01-01 10:55 PM, Joshua Banta wrote:
Dear Listserve,
I have a data-parsing question for you. I recognize this is more in the domain of
PERL/Python, but I don't know those languages! On the other hand, I am pretty good
overall with R, so I'd rather get the job done within the R "ecosphere.
On Wed, Jan 1, 2014 at 10:55 PM, Joshua Banta wrote:
> Dear Listserve,
>
> I have a data-parsing question for you. I recognize this is more in the
> domain of PERL/Python, but I don't know those languages! On the other hand, I
> am pretty good overall with R, so I'd rather get the job done withi
On 31 Dec 2013, at 17:32 , Duncan Murdoch wrote:
> On 13-12-31 9:48 AM, David Parkhurst wrote:
>> Two or three respondents asked for an example of my problem. Here's
>> what's happening to me now. I can't reproduce how I got to this point,
>> though:
>>
>> > ls()
>> [1] "All8" "All8Sites"
Hi Joshua
This is one way to do it. Not sure if it this is an efficient implementation
for your needs; it depends on the size of your data.
string1 <- "ATCGCCCGTA[AGA]TAACCG"
string2 <- "ATTATACGCA[AAATGA]GCTA[AT]GCATTA"
foo <- function(genes){
mypaste <- function(x) paste("[", paste(
I have a following sample data frame. How can I create a group id of column and
b and to obtain column c? a b c 1 1 1 1 1 1 1
1 1 1 2 2 1 2 2 1 2 2 1 3 3 1
3 3 1 3 3 2 1 4 2 1
Hi all,
I want to estimate an equation system with 3 nonlinear continuous
equations and one discrete choice (using multinomial logit for the
latter). For the nonlinear continuous equations, function nlsystemfit
{systemfit} seems to be appropriate. But what's about the discrete
choice? Its error
Hi
Your question was formated in HTML and therefore came scrammbled. Post in plain
text. And preferably use dput for posting data.
Regards
Petr
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Norbi Gurracho
> Sent: Thursda
Hi,
Try:
dat <- read.table(text="a b c
1 1 1
1 1 1
1 1 1
1 2 2
1 2 2
1 2 2
1 3 3
1 3 3
1 3 3
2 1 4
2 1 4
2 1 4
2 2 5
2 2 5
2 2 5
2 2 5",sep="",header=TRUE)
Hi,It is not very clear.
data1 <- read.table("PGRTvsPDGRT_frags.txt",header=TRUE,stringsAsFactors=FALSE)
mat1<- as.matrix(data1[,-1])
row.names(mat1)<- data1[,1]
res <- mat1[apply(mat1,1,function(x) all(x[1:6]!=0) & all(x[7:12]!=0)),]
sum(rowSums(!res)>0)
#[1] 0
#or
#depending upon what you want
Hi,
I would like to compare row data in the same column through a data frame
and remove all rows that do not fit the criteria.
for example if I have the following data frame:
line start A1 21 A2 22 A3 23 B4 19 B2 24 B6 12
I would like to compare the 'start' value of each line to the value
Hi,
May be this helps:
dat1 <- read.table(text="line start
A1 21
A2 22
A3 23
B4 19
B2 24
B6 12",sep="",header=TRUE,stringsAsFactors=FALSE)
dat1[c(TRUE,diff(dat1[,2]) >0 ),]
# line start
#1 A1 21
#2 A2 22
#3 A3 23
#5 B2 24
A.K.
On Thursday, January 2, 2014 10:54
Hi,
Also, to make it general:
vec1 <- with(dat,paste(a,b))
within(dat,d <- as.numeric(factor(vec1,labels=seq(length(unique(vec1))
#or
within(dat,d <- match(vec1,unique(vec1)))
#or
within(dat,d<- as.numeric(interaction(a,b))) #ids are unique, not in the same
order
A.K.
On Thursday, J
Happy New Year everyone,
I need some help figuring out if there is an R package tailored towards
endorsement frequencies. Would y'all here know of any such packages that
they would recommend I use?
Thanks!
Lily
If it doesn't challenge you, it doesn't change you - Fred DeVito
[[alte
Hi Lila,
You will probably have to be more specific. What exactly do you want
to do? Have you looked at http://cran.r-project.org/web/views/ ?
Best,
Ista
On Thu, Jan 2, 2014 at 9:59 AM, Lila Lorne wrote:
> Happy New Year everyone,
>
> I need some help figuring out if there is an R package tail
On 01/01/2014 07:36 PM, William Dunlap wrote:
2. However, Bill (and Henrik) raised the question of replacing '1' with
'1L'; I understand the meaning of that, but does it matter (in practice)?
On 12/22/2013 06:57 PM, William Dunlap wrote:
for (i in seq_len(x - 1) + 1)
should be efficient and sa
Thanks Arun.
How does code differs if I have a date variable instead of numbers like in
column a?
I have a sample data in dput output.
> dput(mydf)
structure(list(a = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("1", "2"), class = "factor"),
b = s
I am working with a dataset that is observations of mentors or senior
teachers evaluating new or junior teachers in primary classrooms. There are
27
items (5-pt Likert) and I would like to know the proportion of
respondents who endorse each response category, including floor and ceiling
effects. I
Hi Norbi,
It would be almost the same.
vec1 <- with(mydf,paste(b,date))
res <- within(mydf, d <- match(vec1,unique(vec1)))
res$d
# [1] 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 5
mydf$date <- as.Date(mydf$date)
A.K.
On Thursday, January 2, 2014 12:04 PM, Norbi Gurracho
wrote:
Thanks Arun.
How does co
see ?table and ?prop.table for counts and proportions. For factor
analysis I usually use the functions in the psych package (see
https://personality-project.org/r/#factoranal) , but there are others
including the built in ?factanal function. Additional options are
described in the psychometrics tas
Hi,
May be this helps:
var1 <- ave(seq_along(fam),fam,FUN=length)
names(var1) <- fam
var1
#2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
#4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
#or
table(fam)[as.character(fam)]
#fam
#2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
#4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
fam1 <- c(fam,2)
var2 <-
Hi,
May be this helps:
set.seed(42)
output1 <- list(list(matrix(0,8,11),matrix(0,8,11)),
list(matrix(rnorm(80),8,10),matrix(rnorm(80),8,10)))
library(emdist)
sapply(output1,function(x) {emd2d(x[[seq_along(x)[1]]],x[[seq_along(x)[2]]]) })
#[1] NaN -6.089909
A.K.
I'm trying to apply a fu
#or
mapply(emd2d,sapply(output1,`[`,1),sapply(output1,`[`,2))
#[1] NaN -6.089909
A.K.
On Thursday, January 2, 2014 2:33 PM, arun wrote:
Hi,
May be this helps:
set.seed(42)
output1 <- list(list(matrix(0,8,11),matrix(0,8,11)),
list(matrix(rnorm(80),8,10),matrix(rnorm(80),8,10)))
libra
Xebar Saram gmail.com> writes:
>
> Hi All,
>
> I have a terrible issue i cant seem to debug which is halting my work
> completely. I have R 3.02 installed on a linux machine (arch linux-latest)
> which I built specifically for running high memory use models. the system
> is a 16 core, 256 GB RA
Describing the problem would help a lot more. For example, if you were
using some of the parallel processing options in R, this can make extra
copies of objects and drive memory usage up very quickly.
Max
On Thu, Jan 2, 2014 at 3:35 PM, Ben Bolker wrote:
> Xebar Saram gmail.com> writes:
>
> >
O-ha, sorry, Luca, I mixed up arguments: it shouldn't be "subset" but
"select".
apply( subset( d2, select = V13:V239), 1, function( x) any( x != ""))
should work.
"Auf Wiederhören!" ;-)
Regards -- Gerrit
On Thu, 2 Jan 2014, Luca Meyer wrote:
Hi Gerrit,
Thank you for the suggestion. Un
Dear Reinhard
On 2 January 2014 14:12, Reinhard Hössinger
wrote:
> I want to estimate an equation system with 3 nonlinear continuous
> equations and one discrete choice (using multinomial logit for the
> latter). For the nonlinear continuous equations, function nlsystemfit
> {systemfit} seems to
HI,
I tested it on R 3.0.2 console (linux) and also on Rstudio Version 0.98.490.
It seems alright.
A.K.
Thanks for this. I am trying to run the code you posted but Rstudio keeps
crashing. I am trying to run it on the example output1 since it's small but
that crashes as well.
On Thursday
Le jeudi 02 janvier 2014 à 09:07 +0200, Xebar Saram a écrit :
> Hi All,
>
> I have a terrible issue i cant seem to debug which is halting my work
> completely. I have R 3.02 installed on a linux machine (arch linux-latest)
> which I built specifically for running high memory use models. the system
Dear list,
I'm most likely doing something wrong, but I'm getting an error message in
tab2 below (tab1 is fine). Any hint is much appreciated.
library(tables)
set.seed(1)
dd <- data.frame(x = rnorm(100), f1 = gl(2, 50, labels = c("A", "B")),
f2 = gl(4, 25, labels = c("a", "b", "c
HI,
If I understand correctly, you could also try:
set.seed(48)
d2 <-
as.data.frame(matrix(sample(c("",letters[1:2]),26*245,replace=TRUE),26,245))
d2[3,] <- ""
names1 <-paste0("V",13:239)
res <- d2[rowSums(d2[,names1]=="") < ncol(d2[,names1]),names1]
A.K.
On Thursday, January 2, 2014 1:20
R 3.0.2
All platforms
Colleagues
This question is probably conceptual rather than technical and I have not
thought out all of the issues yet. Let’s say I have an extensive list of
functions and some lines of code that call the functions. I would like to have
a record of all the commands that
On 14-01-02 6:05 PM, Fisher Dennis wrote:
R 3.0.2
All platforms
Colleagues
This question is probably conceptual rather than technical and I have not
thought out all of the issues yet. Let’s say I have an extensive list of
functions and some lines of code that call the functions. I would lik
On 14-01-02 5:36 PM, Lars Bishop wrote:
Dear list,
I'm most likely doing something wrong, but I'm getting an error message in
tab2 below (tab1 is fine). Any hint is much appreciated.
This was a bug in tables, which I've tracked down. I'll soon upload an
update to R-forge, later to CRAN. Loo
Hi,
Try ?match
b[match(d,a)]
#[1] "Joe" "Bob" "Dick"
A.K.
I have three vectors as follows:
> a <- c('A','B','C','D','E')
> b <- c('Tom','Dick','Harry','Bob','Joe')
> d <- c('E','D','B')
Subsetting b by using d on a, with b[a %in% d], gives the names in the order
they appear in b:
> b
Hi
On 01/02/2014 04:04 PM, arun wrote:
Hi,
Try ?match
b[match(d,a)]
#[1] "Joe" "Bob" "Dick"
Or use 'a' to put names on 'b':
> names(b) <- a
> b
A B C D E
"Tom" "Dick" "Harry" "Bob" "Joe"
Then subset by names:
> b[d]
E D B
On 02-Jan-2014 23:55:28 Duncan Murdoch wrote:
> On 14-01-02 6:05 PM, Fisher Dennis wrote:
>> R 3.0.2
>> All platforms
>>
>> Colleagues
>>
>> This question is probably conceptual rather than technical and I have not
>> thought out all of the issues yet. Lets say I have an extensive list of
>> func
For the likert scale items, please look at the likert function in the
HH package.
install.package("HH")
library(HH)
?likert
demo("likert-paper")
Rich
On Thu, Jan 2, 2014 at 1:10 PM, Lila Lorne wrote:
> I am working with a dataset that is observations of mentors or senior
> teachers evaluating
Dear all,
Happy new year all of You and with best wishes coming to you in this new year.
I have a problem in running a command in rms package.
Does any can help me with my problem.
I wanna use predab.resample command to compute bias-corrected estimates of a
vector of indexes of Predictive accu
On Jan 2, 2014, at 11:03 AM, Agony wrote:
> Dear all,
>
> Happy new year all of You and with best wishes coming to you in this new year.
>
> I have a problem in running a command in rms package.
> Does any can help me with my problem.
>
> I wanna use predab.resample command to compute bias-co
44 matches
Mail list logo