Displaying 20 results from an estimated 1100 matches similar to: "R: Searching and deleting elements of list"
2007 Mar 08
1
Searching and deleting elements of list
Hi,
I have a problem. Please, look at example and try to help me!!
> A<-c("aaa","bbb","ccc","ddd","eee")
> B<-c("vvv","ooo","aaa","eee","zzz","bbb")
> C<-c("sss","jjj","ppp","ddd")
> D<-c("bbb","ccc")
2007 Feb 23
4
using "integrate" in a function definition
Dear list members,
I'm quite new to R, and though I tried to find the answer to my probably
very basic question through the available resources (website, mailing
list archives, docs, google), I've not found it.
If I try to use the "integrate" function from within my own functions,
my functions seem to misbehave in some contexts. The following example
is a bit silly, but
2020 Oct 29
2
dovecot quota-warning detection mail
OK. "passdb/userdb" Setting part
$ dovecot -n (Excerpt from change)
----------------------------------------------------------------------------
---------------------
passdb {
args = scheme=CRYPT username_format=%u /etc/dovecot/users.auth
driver = passwd-file
}
userdb {
args = username_format=%u /etc/dovecot/users.auth
driver = passwd-file
}
protocol lmtp {
info_log_path =
2008 Jul 09
2
Read.table - Less rows than original data
Dear all,
I have problem when reading a table into R. The total row of read in table
has is much less than the original saved table.
I built a 1,273,230 by 6 data set named "mydata2", it was saved in the
following command,
write.table(mydata2, "mydata2.txt", row.name=F,col.name=T,quote=F,sep="\t")
The next day I read in above saved text file into R,
2001 Dec 19
2
How to create a data.frame "like" another, but longer?
Hello,
does anyone know of a quick way to create a data frame "like" another, but
with more rows?
What I'd like to do is this:
if mydata is a data.frame like
a b c
1 TRUE yes
2 FALSE no
3 TRUE yes
I'd like to get mydata2 with the same column names and column types, but
without the values and with more rows.
All I could think of was to manually do
2006 Feb 20
3
Boxplot Help for Neophyte
R helpers
I am getting to grips with R but came across a small problem today that I
could not fix by myself.
I have 3 text files, each with a single column of data. I read them in
using:
myData1<-scan("C:/Program Files/R/myData1.txt")
myData2<-scan("C:/Program Files/R/myData2.txt")
myData3<-scan("C:/Program Files/R/myData3.txt")
I wanted to produce a
2008 Jul 09
1
read.table problem
Dear all,
I have problem when reading a table into R. The total row of read in table
has is much less than the original saved table.
I built a 1,273,230 by 6 data set named "mydata2", it was saved in the
following command,
write.table(mydata2, "mydata2.txt", row.name=F,col.name=T,quote=F,sep="\t")
The next day I read in above saved text file into R,
2012 Jul 03
1
insert missing dates
Hello
I have dataframes.
mydata1 <-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25 07:00:00
","2005-05-25 19:00:00","2005-06-25 07:00:00","2005-06-25 19:00:00
","2005-07-25 07:00:00","2005-8-25 19:00:00"))
or
mydata2 <-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25 00:00:00
","2005-05-25
2009 Sep 30
4
How do I do simple string concatenation in R?
Dear R gurus
How do I do simple string concatenation in R?
For example:
A = "klm"
B = "jjj"
How can I assign a value to C such that C == "klmjjj" is True?
Thank you
Arie
[[alternative HTML version deleted]]
2011 Jun 21
5
converting character to numeric
I'm trying to convert data from character to numeric.
I've imported data as a csv file, I'm assuming that the import is a
database - are all the columns in a database considered "vectors" and that
they can be operated on individually
Therefore I've tried the following
mydata <- as.numeric(mydata$apples)
when i then look at mydata again the named column is still
1999 May 27
2
Can't connect to samba from foreign network --- 'Gethostbyaddr failed' error in log.smb
I have a samba server at ip address
aaa.bbb.ccc.ddd
I can connect to it from clients on subnets aaa.bbb.eee. and
aaa.bbb.fff.
I can't connect to it from clients on ggg.hhh.
smb.conf has
hosts deny = all
hosts allow = localhost, aaa.bbb., ggg.hhh.
The client can successfully 'ping mysambaserver' (resolves to
aaa.bbb.ccc.ddd). Doing 'net view \\mysambaserver' fails with
2009 Jan 06
5
Using apply for two datasets
I can run one-sample t-test on an array, for example a matrix myData1,
with the following
apply(myData1, 2, t.test)
Is there a similar fashion using apply() or something else to run
2-sample t-test with datasets from two groups, myData1 and myData2,
without looping?
TIA,
Gang
2006 Nov 09
1
dissimilarity matrices
Dear All,
I have a dissimilarity matrix which I happily convert to a distance object
by running:
X <- as.dist(Y)
and I can happily now run either hclust(X) or agnes(X).
So that the various bits of output are labelled correctly I would dearly
like to be able to give names to the columns and rows of X, as would happen
if I ran:
mydata<-read.table("clipboard",header=T)
2011 Feb 25
1
speed up process
Dear users,
I have a double for loop that does exactly what I want, but is quite
slow. It is not so much with this simplified example, but IRL it is slow.
Can anyone help me improve it?
The data and code for foo_reg() are available at the end of the email; I
preferred going directly into the problematic part.
Here is the code (I tried to simplify it but I cannot do it too much or
else it
2008 Apr 15
2
How can I import user-defined missings from Spss?
Hi,
It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get).
But no matter which way I do import the data, user-defined missings from Spss are always lost.
(it makes no difference if there are a single value, a range, or any combination of them. They are always ignored).
Is there any way in R to find out if any value was user-defined missing
2009 Sep 14
1
ggplot2 legend text....a basic question
Hello fellow R's,
I?ve been learning to use the ggplot2 library, and after a full day of
work I still have a couple of basic questions.
Here is an example:
mydata=data.frame(x=runif(20),y=runif(20),n=runif(20))
mydata2=data.frame(x=c(0.4,0.6,0.5),y=c(0.4,0.4,0.6))
ggplot(mydata, aes(x, y)) + geom_point(aes(size = n)) +
geom_polygon(data=mydata2,aes(x,y,alpha=0.5))
In this plot, the
2010 Aug 30
2
S4 Method Rd Warning
Hello,
I am using R 2.11.0. I have a curious problem where I get a warning in R CMD check which is seemingly not relevant to my Rd file.
The warning says :
* checking Rd \usage sections ... WARNING
Bad \usage lines found in documentation object 'enrichmentCalc':
<unescaped bksl>S4method{enrichmentCalc}{GenomeDataList, BSgenome}(rs, organism, seqLen=NULL, ...)
<unescaped
2010 Aug 30
2
S4 Method Rd Warning
Hello,
I am using R 2.11.0. I have a curious problem where I get a warning in R CMD check which is seemingly not relevant to my Rd file.
The warning says :
* checking Rd \usage sections ... WARNING
Bad \usage lines found in documentation object 'enrichmentCalc':
<unescaped bksl>S4method{enrichmentCalc}{GenomeDataList, BSgenome}(rs, organism, seqLen=NULL, ...)
<unescaped
2007 Jul 11
1
aov() question
Hi all,
So I think I have seen some similar questions to mine when I searched
the archives, but have not seen any concrete answers and was
wondering if any one could help.
I have been trying to use R's aov() function to analyze my data. I
have a 3 x 4 x 2 repeated measures design. All of the IVs are within
subjects. I do also have missing values (unequal N), as I have to
remove
2010 Aug 05
2
try-error within for loop
Dear all,
I run a loop wrapped in try(), and for each of the rows where
"try-error" is true I want to fill that row with NA (at the moment it is
omitted). So I would expect to get a dataframe with 1000 rows some of
which would be empty, but instead I get a dataframe with 995 rows. In
this case missing 5 rows were omitted.
Any suggestions?
Thanks,
Olga
----------------