Dear All,
This is a simple question, but I'm stumped about the simplest way to search a
list object such as the following:
This randomish snippet:
n - c(round(runif(round(runif(1,1,10),0),1,10),0))
alist - new(list)
for (i in seq_along(n)) {
alist[[i]] -
Hi,
rapache.net is definitely worth to check.
And also rook from the same author (Jeffrey Horner).
Best,
Gergely
On 28 March 2013 03:19, Lauren Zhang zxj19880...@yahoo.cn wrote:
Hi,
I met tough problems when calling R in PHP. I have tried several ways, but
none of them succeed.
first of
Hi Eric,
something like the following might me a starter
(index-lapply(alist,function(x)which(x==x.search)))
cheers.
Am 28.03.2013 08:40, schrieb Eric Rupley:
Dear All,
This is a simple question, but I'm stumped about the simplest way to search a
list object such as the following:
Hello,
I have created many excel files in my working dir. each excel file contain one
country's data. In the excel, I have dataframe in sheet1, where each product
and its relative information is
in each row as following:
ProductPERetail_price_Band Country Model_Fit
A
Hi, Eric,
as a quick hack, does
spots - sapply( alist,
function( listcomp)
which( listcomp == value.to.look.for) )
spots[ sapply( spots, length) == 0] - NULL
do what you want?
Regards -- Gerrit
On Thu, 28 Mar 2013, Eric Rupley wrote:
Dear All,
This
Hi I just would like to know,
When I have a dataframe, like this one called 'dummy'
And I attach it.
Then I run my code.
I then update the dataframe by making changes and I still call it 'dummy'.
I run my code again.
Now dummy is at position 1 and position 2 of the search path and if I run the
Dear R forum
Suppose I have a data.frame
df = data.frame(id = c(1:6), x = c(15, 21, 14, 21, 14, 38), y = c(36, 38, 55,
11, 5, 18), x.1 = c(15, 21, 14, 21, 14, 38), z = c(D, B, A, F, H,
P))
df
id x y x.1 z
1 1 15 36 15 D
2 2 21 38 21 B
3 3 14 55 14 A
4 4 21 11 21 F
5 5 14 5
Hi, Pancho,
1. Quote:
PLEASE do ... provide commented, minimal, self-contained, reproducible
code.
2. Changes of variables of attached data frames are -- usually -- not
permanent (i.e., disappear when the data frame is detached again).
3. The of use detach( dummy) is to detach the data
Hi, Katherine,
IF the naming scheme of the columns of your data frame is consistently
stringwithoutdot and stringwithoutdot.number if duplicated columns
appear THEN (something like)
df[ -grep( \\., names( df))]
could help. (But it's maybe more efficient to avoid - a priori - producing
Good morning to the German readers,
I'm thinking about getting me a t-shirt with the proverb
R-kenntnis ist der erste Schritt auf dem Weg zur Besserung
(awareness is the first step towards improvement, the pun being that the first
word can also be read as R-knowledge)
1. Could there be a
Dear Sir,
Thanks a lot for your wonderful solution. When I applied it my data.frame,
however, it was deleting many other columns also having repeated type of column
names i.e. suppose I wanted only to delete say ABC.1, ABC.2 etc. and retain
XYZ, XYZ.1, XYZ2 etc. But this was not happening and
Hi,
I was trying to make a 3D plot using densCols. The documentation for
densCols doesn't look like it'll work for 3D. For example:
-
library(scatterplot3d)
v1 - rnorm(1)
v2 - rnorm(1)
v3 - rnorm(1)
## 2D with denscols
mat1 - cbind(v1,v2)
this might screw up the column classes of some of your columns, but it
could be enough for what you're doing :)
# start with a data frame with duplicate columns
v - data.frame(id = c(1:6), x = c(15, 21, 14, 21, 14, 38), y = c(36, 38,
55, 11, 5, 18), x.1 = c(15, 21, 14, 21, 14, 38), z = c(D, B,
Hello,
According to ?scatterplot3d, the option is 'color', not 'col'.
scatterplot3d(mat,color=mcols,pch=16)
HTH,
Pascal
On 28/03/13 19:41, Brian Smith wrote:
Hi,
I was trying to make a 3D plot using densCols. The documentation for
densCols doesn't look like it'll work for 3D. For example:
Hello,
Does an e-learning environment for R (in English) exist? I would like
to point out to students a way to learn R if they have missed the
course on R.
Pekka Pere
University Lecturer
University of Helsinki
__
R-help@r-project.org mailing
Ah, yes, correct - the option is color.
However, I think the problem (i.e. MY problem) is with densCols - I need it
to calculate the 3D density!
thanks!
On Thu, Mar 28, 2013 at 6:52 AM, Pascal Oettli kri...@ymail.com wrote:
Hello,
According to ?scatterplot3d, the option is 'color', not
Hi
there are some good tips in The R Inferno
http://www.burns-stat.com/documents/books/the-r-inferno/
or connect C++ to R with Rcpp
http://dirk.eddelbuettel.com/code/rcpp.html
or byte code compiler (library(compiler))
or library(data.table)
but do you have an idea to fasten standard R source
Does 'Try R' suit your requirements?
http://tryr.codeschool.com/
Pat
On 28/03/2013 07:05, Pekka Pere wrote:
Hello,
Does an e-learning environment for R (in English) exist? I would like to
point out to students a way to learn R if they have missed the course
on R.
Pekka Pere
University
On 13-03-28 7:07 AM, Christof Kluß wrote:
Hi
there are some good tips in The R Inferno
http://www.burns-stat.com/documents/books/the-r-inferno/
or connect C++ to R with Rcpp
http://dirk.eddelbuettel.com/code/rcpp.html
or byte code compiler (library(compiler))
or library(data.table)
but do you
Hi,
Can R read in .xyz files? If so, what is the package,
thanks
--
Shane
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
What created your xyz files? File extensions aren't unique. What kind of
data do they contain?
At least some kinds of xyz files are plain text and can be read with
read.table.
Sarah
On Thursday, March 28, 2013, Shane Carey wrote:
Hi,
Can R read in .xyz files? If so, what is the package,
Shane, you replied to just to me rather than the list.
I'm not familiar with geosoft, but the name suggests this might be a better
question for r-sig-geo than here.
Is the file binary or text? The internet suggests that it's a text
format. Have you tried using www.rseek.org to search for import
The advice is wise, despite appearances the extension really means nothing
except when it is assumed that it does. Try the raster or rgdal packages,
and the R-Sig-Geo mailing list with much more detail (as requested).
require(raster)
d - raster(somefile)
d - rasterFromXYZ(somefile)
Hi Katherine,
May be this helps:
df[!duplicated(lapply(df,summary))]
# id x y z
#1 1 15 36 D
#2 2 21 38 B
#3 3 14 55 A
#4 4 21 11 F
#5 5 14 5 H
#6 6 38 18 P
#or
df[,colnames(unique(as.matrix(df),MARGIN=2))]
# id x y z
#1 1 15 36 D
#2 2 21 38 B
#3 3 14 55 A
#4 4 21 11 F
#5 5 14
-Original Message-
From: metal_lical...@live.com
Sent: Thu, 28 Mar 2013 11:24:43 +0300
To: r-help@r-project.org
Subject: [R] How to search in each excel in my working dir and extract
part information of one product in each country?
Hello,
I have created many excel files in my
Hi,
Try this:
Spec - function(lista,FDR_k) {
list.new-lapply(lista,function(x) within(x,{spec- as.character(spec)}))
split.list-split(list.new,names(lista))
#Data needed with FDRFDR_k
seq.mod.z-lapply(seq_along(split.list),function(i)
lapply(split.list[[i]],function(x)
On Mar 28, 2013, at 1:39 AM, Katherine Gobin wrote:
Dear R forum
Suppose I have a data.frame
df = data.frame(id = c(1:6), x = c(15, 21, 14, 21, 14, 38), y = c(36, 38, 55,
11, 5, 18), x.1 = c(15, 21, 14, 21, 14, 38), z = c(D, B, A, F, H,
P))
df
id x yx.1 z
1 1 15 36
con-file(RRoutall.txt)
Lines1- readLines(con)
close(con)
indx-rep(rep(c(TRUE,FALSE),each=2),22)
Lines2-Lines1[!grepl([A-Za-z],Lines1)]
res-read.table(text=paste(gsub(^\\s+,,Lines2[indx]),gsub(^\\s+,,Lines2[!indx])),sep=,header=FALSE)
nm1-unlist(strsplit(gsub(^
Thanks, that works, however I was hoping for a keyboard shortcut.
On 3/26/2013 11:43, John Kane wrote:
I hve not used Tinn-R in a while (I'm currently running Ubuntu) but I think
that you can just click in the left margin to select the line.
John Kane
Kingston ON Canada
-Original
HI,
Just a correction:
indx-rep(rep(c(TRUE,FALSE),each=2),23)
A.K.
- Original Message -
From: arun smartpink...@yahoo.com
To: Joanna Zhang zjoanna2...@gmail.com
Cc: R help r-help@r-project.org
Sent: Thursday, March 28, 2013 11:38 AM
Subject: Re: [R] Read text file in R
Hello again,
I want to remove $ sign and replace with nothing in my text.
Therefore I used following code:
gsub($|,, , $232,685.35436)
[1] $232685.35436
However I could not remove '$' sign.
Can somebody help me why is it so?
Thanks and regards
__
Hello, all.
I've been working on this for sometime and was almost at the end/ last chunk of
code i would need When I received an error. Rather than go to bed and
think about it in the morning, I messed with my data and now I am not getting
anything. I was up until 4am trying to fix
Katherine Gobin katherine_gobin at yahoo.com writes:
Dear R forum
Suppose I have a data.frame
Say.
[snip]
How to automatically identify and retain only one column (in this example
column x) among the identical
columns besides other non-identical columns (viz. id, y and z).
See
i am using mac OSX 10.7.5, running R version 2.15.2 (2012-10-26) -- Trick or
Treat
when i do:
uncountry - unique(wvsAB[,7])
wvsAB$numcountry - match(wvsAB$country, uncountry)
unstate isn't attaching.
library(base)
uncountry - unique(wvsAB[,7])
wvsAB$numcountry - match(wvsAB$country,
In regular expressions, $ means the end of the line, so you have
to escape it:
gsub(\\$|,, , $232,685.3567)
[1] 232685.3567
On Thu, Mar 28, 2013 at 11:39 AM, Christofer Bogaso
bogaso.christo...@gmail.com wrote:
Hello again,
I want to remove $ sign and replace with nothing in my text.
On Mar 28, 2013, at 10:39 AM, Christofer Bogaso bogaso.christo...@gmail.com
wrote:
Hello again,
I want to remove $ sign and replace with nothing in my text.
Therefore I used following code:
gsub($|,, , $232,685.35436)
[1] $232685.35436
However I could not remove '$' sign.
Can
Hi,
If you just want to remove the $, it must be escaped because $ is a
special character in regular expressions.
gsub(\\$, , $232,685.35436)
[1] 232,685.35436
But it looks like you actually want to remove both $ and ,
Modifying your code:
gsub(\\$|,, , $232,685.35436)
[1] 232685.35436
Or
Nicole, this list strips binary attachments.
Using dput() is the most effective way to include some of your data,
and we also need to see the R code you're trying to use, and some
information about what you want to accomplish, all included in the
body of your email.
Sarah
On Thu, Mar 28, 2013
Hi,
I'm confused.
On Thu, Mar 28, 2013 at 10:49 AM, Nicole Ford nicolefor...@gmail.com wrote:
i am using mac OSX 10.7.5, running R version 2.15.2 (2012-10-26) -- Trick or
Treat
when i do:
uncountry - unique(wvsAB[,7])
wvsAB$numcountry - match(wvsAB$country, uncountry)
unstate isn't
You can use 'list.files()' to get the list of all the Excel file names and
then the XLConnect package makes it easy to read in the files and extract
the data that you want from them.
On Thu, Mar 28, 2013 at 4:24 AM, Tammy Ma metal_lical...@live.com wrote:
Hello,
I have created many excel
Yes, but the elephant in the room is:
Define: Identical.
If you do not know why this is an elephant, see FAQ 7.31.
-- Bert
On Thu, Mar 28, 2013 at 8:40 AM, Charles Berry ccbe...@ucsd.edu wrote:
Katherine Gobin katherine_gobin at yahoo.com writes:
Dear R forum
Suppose I have a
Charles Berry ccberry at ucsd.edu writes:
[snip]
Katherine Gobin katherine_gobin at yahoo.com writes:
How to automatically identify and retain only one column (in this example
column x) among the identical
columns besides other non-identical columns (viz. id, y and z).
See
?unique
Sachin,
library(igraph)
?tkplot
Jean
On Wed, Mar 27, 2013 at 7:32 PM, Sachinthaka Abeywardana
sachin.abeyward...@gmail.com wrote:
Hi all,
I was wondering if there was package/ tutorial somewhere so that I can
plot INTERACTIVE networks in R. What I mean by interactive is that you
can
Hi,
Can R read open office.org Calc files
Thanks
--
Shane
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
This might help:
http://www.omegahat.org/ROpenOffice/
Rgds,
Rainer
On Thursday 28 March 2013 17:32:23 Shane Carey wrote:
Hi,
Can R read open office.org Calc files
Thanks
__
R-help@r-project.org mailing list
Dear All,
wonder if you have a thought on the following: I am using the round(x,digits=3)
command, but some of my values come out as: 0.07099 AND
0.06901. Any thoughts on why this maty be happening or how to
eliminate the problem?
apreciate the help,
Andras
On Mar 28, 2013, at 10:40 AM, Rainer Schuermann wrote:
This might help:
http://www.omegahat.org/ROpenOffice/
Rgds,
Rainer
Just to save some people some time, I will add that the ROpenOffice package
depends on the RCompression package and will not install on R3.0.0 beta until
you also
On Thu, Mar 28, 2013 at 6:21 PM, Andras Farkas motyoc...@yahoo.com wrote:
Dear All,
wonder if you have a thought on the following: I am using the
round(x,digits=3) command, but some of my values come out as:
0.07099 AND 0.06901. Any thoughts on why this maty be
Hi,
The function outputs the unique rows and also chisq test on frequency ( by row).
Spec - function(lista,FDR_k) {
list.new-lapply(lista,function(x) within(x,{spec- as.character(spec)}))
split.list-split(list.new,names(lista))
#Data needed with FDRFDR_k
Hi All,
I posted this on the bioconductor list and didn't get a response there, so I'm
hoping someone here can help.
I don't know a heck of a lot about R, so I apologize if this seems like a
trivial issue. This error comes up when trying to install the bioconductor
globaltest package.
Any
Hello,
Try
gsub([$,], , $232,685.35436)
Hope this helps,
Rui Barradas
Em 28-03-2013 15:39, Christofer Bogaso escreveu:
Hello again,
I want to remove $ sign and replace with nothing in my text.
Therefore I used following code:
gsub($|,, , $232,685.35436)
[1] $232685.35436
However I
my data was deleted, i supposed i uploaded it wrong. that's fine i found the
problem...
it's with the base package, actually.
please see below:
R version 2.15.3 (2013-03-01) -- Security Blanket
Copyright (C) 2013 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform:
right i am sorry.
i am working in the dput() now.
~Nicole Ford
Ph.D. student
Graduate Assistant/ Instructor
University of South Florida
Government and International Affairs
office: SOC 012M
On Mar 28, 2013, at 12:01 PM, Sarah Goslee wrote:
Key words being small reproducible example -
Now R isn't running on my computer AT ALL. i deleted it and d/l'd again,
trying to get it to work, it keeps crashing. so perhaps this is a hardware
issue. the absolute worst timing.
~Nicole Ford
Ph.D. Student
Instructor: Empirical Political Analysis
Department of Government and International
Thomas,
any chance that you could have problems with your graphic driver? For
instance, if you have an Nvidia graphic card, I would recommend switching
from the 'nouveau' driver to the official Nvidia one.
Kind regards,
luca
[[alternative HTML version deleted]]
I have several plots from attempts yesterday where i was clearly getting the
data in. however, that is no longer the case.
~Nicole Ford
Ph.D. student
Graduate Assistant/ Instructor
University of South Florida
Government and International Affairs
office: SOC 012M
On Mar 28, 2013, at 12:01
Hi,
You also mentioned about separating the significant from the non-significant.
If you replace:
Chisq1test_Count-do.call(cbind,lapply(as.data.frame(combn(names(res)[4:ncol(res)],2),stringsAsFactors=FALSE),function(x)
i meant uncountry. i am creating one now/ dput().
thanks.
~Nicole Ford
Ph.D. student
Graduate Assistant/ Instructor
University of South Florida
Government and International Affairs
office: SOC 012M
On Mar 28, 2013, at 11:55 AM, Sarah Goslee wrote:
Hi,
I'm confused.
On Thu, Mar 28,
Many thanks.
On Wed, Mar 27, 2013 at 3:50 AM, Achim Zeileis-4 [via R]
ml-node+s789695n4662592...@n4.nabble.com wrote:
On Tue, 26 Mar 2013, SHISHIR MATHUR wrote:
Thanks for the reply Achim. The reason I suspect autocorrelation is
because I think that within the same neighborhood, homes
On 3/28/2013 11:05 AM, Shields, Rusty (IMS) wrote:
Hi All,
I posted this on the bioconductor list and didn't get a response there, so I'm
hoping someone here can help.
I don't know a heck of a lot about R, so I apologize if this seems like a
trivial issue. This error comes up when trying to
On 28/03/2013 2:21 PM, Andras Farkas wrote:
Dear All,
wonder if you have a thought on the following: I am using the round(x,digits=3) command, but some of my values come out as: 0.07099 AND 0.06901. Any thoughts on why this maty be happening or how to eliminate the
Luca,
Thank you for the suggestion; I do have an Nvidia graphics card and I am
using the Nvida driver; still searching for a solution, quite odd...
Tom
On Thu, Mar 28, 2013 at 12:28 PM, Luca Nanetti luca.nane...@gmail.comwrote:
Thomas,
any chance that you could have problems with your
The tkexamp function in the TeachingDemos package has an animation control
that you can use.
The animation package will create video files of animated graphs.
On Wed, Mar 27, 2013 at 7:20 AM, catalin roibu catalinro...@gmail.comwrote:
Hello all!
I want to create animated chart of
Hello,
I did a cross-validation using cvlm from DAAG package but wasn't sure how to
assess the result. Does this result means my model is a good model?
I understand that the overall ms is the mean of sum of squares. But is 0.0987 a
good number? The response (i.e. gailRel5yr) has min,1st
Hi
I am trying to add a less than equal sign to a plot. I have previously done
this using unicode but is not working in this instance. Any suggestions
would be great
thanks
example code:
library(ggplot2)
df-data.frame(vis=c(0,0,1,1) , count=c(10,15,20,10) , grp=c(0,1,0,1))
df$grp
All,
Well to my relief and embarrassment, I discovered my problem. About 5 weeks
ago, I shutdown my computer and moved it. When I reconnected everything I
apparently plugged my HDMI monitor into the 'wrong' output port without
realizing it. So, on a whim, just now, I made the switch to the other
Hi,
If you want to stick with the unicode way make sure to set your
encoding system, e.g., on Mac
Sys.setlocale(LC_ALL, en_US.UTF-8)
This differs on Windows/Linux so see ?Sys.setlocale for examples on
other platforms.
Best,
Ista
On Thu, Mar 28, 2013 at 5:22 PM, soon yi soon...@ymail.com
Hi:
Here's a way you could do it entirely within ggplot2. The annotation
functions have a parse = argument which allows you to pass character
string representations of math expressions, but there is no such thing
in the scale functions, so you need a different approach.
library(ggplot2)
df -
Hello,
I want to use pearson's correlation as distance between observations and
then use any centroid based linkage distance (ex. Ward's distance)
When linkage distances are formed as the Lance-Williams recursive
formulation, they just require the initial distance between observations.
See here:
Thank you both for the suggestions.
That worked great djmuse.
djmuseR wrote
Hi:
Here's a way you could do it entirely within ggplot2. The annotation
functions have a parse = argument which allows you to pass character
string representations of math expressions, but there is no such thing
The Division of Statistics + Scientific Computation at The University of Texas
at Austin will be hosting the University’s sixth annual UT Summer Statistics
Institute on the UT Austin campus from May 20 – May 23, 2013. Short courses
are offered at all levels including introductory statistics,
Hi Kathy,
You should first contact the package maintainer (which is me!) before posting
to r-help. Which version of the package are you using? Can you send me a
minimally reproducible code?
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric
Kathy,
You need to make sure that you have installed the latest version of `cmprsk'
package (version 2.2-4). crrstep will not work Otherwise.
Ravi
From: Ravi Varadhan
Sent: Thursday, March 28, 2013 5:25 PM
To: 'kathyhan...@gmail.com'
Cc: r-help@r-project.org
Subject: Re: [R] Crrstep help
To be able to import excel-files into R you also need to download Perl from
http://www.perl.org/. From this link you will have to downlaod a suitable
Strawberry based on the computer you use (Mac/Window). Once installed you
should be able to move on.
--
View this message in context:
Hello Everyone,
I was wondering if anyone knows a solution to a problem I am experiencing. I
have an R script that creates multiple graphs of the data in several data file
using the partimat() function that is located in the klaR library. I would
like to get this graphs into a single image
i am having problem running my own data. yesterday it was working just fine.
today it is not. this is the code i was using as an example to follow. this
code ALSO worked just fine yesterday, and is no longer working at all. i
suspect it is a problem with either my computer or the software,
To be clear everything runs with no error message... the only hint of a
problem is at the end of the code: the plot will not fill out/ it is empty.
if anyone has any idea why something like this might happen, i would greatly
appreciate it... so i can handle it quickly.
thanks in advance.
On
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Nicole Ford
Sent: Thursday, March 28, 2013 4:55 PM
To: r-help help
Subject: [R] problem with plots with short example.
i am having problem running my own data. yesterday it
thank you, dan. any information, no matter how small, is helpful.
i deleted R this moring and reinstalled it. outside of that i am not sure what
else to delete/ reinstall. You mention you reinstalled JAGS- i will give that
a try, as well. thanks!
On Mar 28, 2013, at 8:52 PM, Nordlund, Dan
On Mar 28, 2013, at 1:45 PM, Antelmo Aguilar wrote:
Hello Everyone,
I was wondering if anyone knows a solution to a problem I am experiencing. I
have an R script that creates multiple graphs of the data in several data
file using the partimat() function that is located in the klaR
Hi Nicole
I just upgraded to 2.15.3 today
I was just having similar problems with run.jags and it stopping
dead in its tracks with an error message pointing to somewhere else
See
?run.jags
and the second paragraph of it.
I then got it to run using a run.jags script using Rterm and saved
I was up till 4 am with this sucker trying to figure it out- I thought i lost
my mind/ screwed it up somehow. I guess it's nice to know it really wasn't me.
Though, I AM sad R is messing up- first time in over 3 years, so I guess it
isn't so bad. But timing couldn't have been worse, as I
LOL dennis, thanks for the laugh at the end.
I'm a PhD student... I had never used it before until this last semester when i
started taking Bayes at my new university (transfer because of husband's job
=\). My old dept offered bayes, but not the new one, so i am taking it in the
psychology
Hi Nicole
My code works using source file if I put
library(runjags)
x = testjags(findjags(windows,look_in = c:/Program Files/JAGS))
source(G:/Sweave/Bayes.R)
works ok
Further developments with Sweave. Putting this in the Sweave file
library(runjags)
x =
Gerrit, Eik --
Thanks very much for your replies! This answers my primary question -- was I
missing some simple command that did not resort to function() in some manner.
Both are much more streamlined than my 7 line laughable beast of solution.
Best,
Eric
On Mar 28, 2013, at 2:29 AM,
85 matches
Mail list logo