Hi,
I'm trying to figure out how to use capturing parenthesis in regular
expressions in R. (Doing this in Perl, Java, etc. is fairly trivial,
but I can't seem to find the functionality in R.)
For example, given the string:"10 Nov 13.00 (PFE1020K13)"
I want to capture the first to digits
On 11/05/2010 03:00 AM, Peter Davenport wrote:
Dear R-help,
Could any of you direct me to a function for plotting a grid of colours,
directly specified by a matrix of hex colour codes? In other words I'm
looking for a heatmap() or image()-like function to which I can specify the
colour of each
David Winsemius [Fri, Nov 05, 2010 at 05:18:23AM CET]:
[...]
> If you were trying for something else, then please explain in plain
> English rather than simply showing code that throws an error.
>
Well, code never hurts. But it should be accompanied with a hint towards
what it is meant to do.
-
Thanks a lot thats exactly what I was looking for
Just a quick question I agree the form gets submitted to the URL
"http://www.nseindia.com/marketinfo/indices/histdata/historicalindices.jsp";
and I am filling up the form in the page
"http://www.nseindia.com/content/indices/ind_histvalues.htm";
H
Hi
the list/loop solution given below enables to give you both. You can
transform it to data,frame
data.frame(do.call(cbind, lll),sapply(lll, names))
and add appropriate names
or you can use Jim's solution and combine those 2 steps
Regards
Petr
Matevž Pavlič napsal dne 05.11.2010 00:05:00
From: Erik Iverson
To: r-help@r-project.org
Sent: Fri, November 5, 2010 1:09:19 PM
Subject: Re: [R] setting attributes (SOLVED)
>> The learning curve of R is rather steep at start.
>Yes, it can be. I think the general advice would be
>to get a good Intro to R book if you're just starting
>out.
Dear All,
Can anyone please let me know how exactly ncdf deals with NaN.
I am trying to pass in a vector of data that has some NaN in it, into a
variable in NetCDF.
dimX <- dim.def.ncdf("X","count",(1:6))
dimY <- dim.def.ncdf("Y","count",(1:3))
var1 <-
var.def.ncdf("genotype","freq",list(dimX,
The learning curve of R is rather steep at start.
Yes, it can be. I think the general advice would be
to get a good Intro to R book if you're just starting
out.
That's certainly my advice.
Or, get a book on some methods you're interested
in that uses R (the Springer useR! series is
really us
Hi Mike,
I got it done. Thanks
Your advice:-
> z <- rep(0:9, each = 10)
> z
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]012345678 9
[2,]012345678 9
[3,]01234567
David did help already, but if you want literally what the
Introduction uses then you'll need a vector with as many elements as
the final matrix (in David's example recyling applies to give 100
elements from the original 10).
z <- rep(0:9, each = 10)
attr(z, "dim") <- c(10,10)
That's simply a di
Hi David,
I'm learning R following the tutorial mentioned, nothing else. I got an error
running the code. Please help.
B.R.
Stephen L
- Original Message
From: David Winsemius
To: Stephen Liu
Cc: r-help@r-project.org
Sent: Fri, November 5, 2010 12:18:23 PM
Subject: Re: [R] settin
On Nov 5, 2010, at 12:05 AM, Stephen Liu wrote:
Hi folks,
An Introduction to R
3.3 Getting and setting attributes
http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment
z <- 0:9
z
[1] 0 1 2 3 4 5 6 7 8 9
attr(z, "dim") <- c(10,10)
Error in attr(z, "dim") <- c(10, 10)
Hi Nasrin,
1) You didn't define mean.radiation in your code (for example
using mean.radiation<-NULL)
2) Also, you're using "attach", which is a good recipe for forgetting
something in your environment which will lead into troubles.
3) You didn't define i (for example i <- 1:30)
Tal
-
Hi folks,
An Introduction to R
3.3 Getting and setting attributes
http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment
> z <- 0:9
> z
[1] 0 1 2 3 4 5 6 7 8 9
> attr(z, "dim") <- c(10,10)
Error in attr(z, "dim") <- c(10, 10) :
dims [product 100] do not match the length o
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Immanuel
> Sent: Thursday, November 04, 2010 4:54 PM
> To: Charles C. Berry
> Cc: r-help@r-project.org
> Subject: Re: [R] count occurrence and distance of characters in string
>
Matilda Gogos
mgog...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible c
Wolfgang Polasek gmail.com> writes:
>how to find a function for plotting polygon surface, like
> polgon3d(xc,yc,obs)
>
> xc, yc ... coordinates
> obs observations
> result: persp plot with grid net over the coordinates
Don't know of an off-the-shelf solution. Generate a Delaunay tria
Dear all,
I am using ubuntu linux 32 with 4 Gb. I am running a very small script and I
always got the same error message: CAN NOT ALLOCATE A VECTOR OF SIZE 231.8 Mb.
I have reading carefully the instruction in ?Memory. Using the function gc() I
got very low numbers of memory (please sea be
On Nov 4, 2010, at 8:06 PM, Charles C. Berry wrote:
On Fri, 5 Nov 2010, Immanuel wrote:
Hey,
thanks for the answer, actually I already typed an example
but deleted it since I thought it's superfluous.
regards
-
string <- "kjokllokkoadddo"
# f1(string, "o") should return that "o" wa
On 11/4/10 2:39 AM, sayan dasgupta wrote:
> Hi RUsers,
>
> Suppose I want to see the data on the website
> url <- "http://www.nseindia.com/content/indices/ind_histvalues.htm";
>
> for the index "S&P CNX NIFTY" for
> dates "FromDate"="01-11-2010","ToDate"="02-11-2010"
>
> then read the html tab
Hello,
I'd like to fit a user defined function to a data set, but I have problems
to find my problem. The user defined function is a combination of two
rectangular functions, and the listing below gives an example for what I
want to do. The problem is, that I get the error message for fit1 and fit
try this:
The top half of the matrix is the counts and the bottom is the value:
> x <- apply(mat, 2, function(a) c(sort(table(a)),
> as.integer(names(sort(table(a))
> x
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 4856 4906 4857 4877 4788 4880 4861 4851 4878 4841
[2,] 490
On Fri, 5 Nov 2010, Immanuel wrote:
Hey,
thanks for the answer, actually I already typed an example
but deleted it since I thought it's superfluous.
regards
-
string <- "kjokllokkoadddo"
# f1(string, "o") should return that "o" was found 4 times
# f2(string, "o") should return that th
Is this what you want:
> x
V1 V2 V3 V4
1 ascii1: 11 12 13
2 ascii2: 14 15 16
3 ascii3: 17 18 19
> z <- as.matrix(x[,-1])
> z
V2 V3 V4
[1,] 11 12 13
[2,] 14 15 16
[3,] 17 18 19
> as.vector(z)
[1] 11 14 17 12 15 18 13 16 19
>
On Thu, Nov 4, 2010 at 6:05 PM, DomDom wrote:
>
> okay sorr
Hey,
thanks for the answer, actually I already typed an example
but deleted it since I thought it's superfluous.
regards
-
string <- "kjokllokkoadddo"
# f1(string, "o") should return that "o" was found 4 times
# f2(string, "o") should return that the distances between the "o"'s
found is
On Thu, 4 Nov 2010, Immanuel wrote:
Hello all,
I want to know how often one character occurs in a given string
and the distance from between every two occurences. (distance = other
characters between them).
You should provide "commented, minimal, self-contained, reproducible code"
as asked.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Immanuel
> Sent: Thursday, November 04, 2010 3:42 PM
> To: r-help@r-project.org
> Subject: [R] count occurrence and distance of characters in string
>
> Hello all,
>
> I want to
Hi,
I tried to manage exponential family state-space model with the packages
KFAS and sspir.
The problem is that my data set includes some NA observation and it seems
not working.
Any suggestion?
Thanks in advance,
Federico
--
View this message in context:
http://r.789695.n4.nabble.com/NA-val
Hi Jim,
Actually, this is better, but both values are what i am looking for. Count and
the value of the count.
Is there a way to just paste those two together?
Thanks, m
-Original Message-
From: jim holtman [mailto:jholt...@gmail.com]
Sent: Thursday, November 04, 2010 9:59 PM
To: Mat
Hello all,
I want to know how often one character occurs in a given string
and the distance from between every two occurences. (distance = other
characters between them).
thanks
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo
Hi,
I tried to manage exponential family state-space model with the packages
KFAS.
The problem is that my data set includes some NA observation and it seems
not working.
Any suggestion?
Thanks in advance,
Federico
--
View this message in context:
http://r.789695.n4.nabble.com/R-pkgs-New-packa
Hello I am using the mgui function in the following way:
mgui ( graf_cuenta_margen_interfaz,title=c("Gráficas","Histogramas
valoración (No lineal) Cuenta de
Margen"),exec="Graficar",argText=list(fecha_adelante="Fecha
adelante"),closeOnExec=TRUE,output=NULL,,helps=list(fecha_adelante=paste("La
valo
okay sorry.
i´ve got three ascii files with pixel values without any header information.
so if the first line of the three ascii files are:
ascii1: 11 12 13
ascii2: 14 15 16
ascii3: 17 18 19
i would like a new matrix with:
11,14,17;12,15,18;13,16,19;
thx
--
View this message in context:
ht
DomDom wrote:
Hi there,
i´ve got a problem with how to create a vector with three variables out of
three seperate ascii files.
These three ascii files contain pixel information of the same image but
different bands and i need a matrix of
vectors, with each vector containing the corresponding
Hi there,
i´ve got a problem with how to create a vector with three variables out of
three seperate ascii files.
These three ascii files contain pixel information of the same image but
different bands and i need a matrix of
vectors, with each vector containing the corresponding pixel values for
Is this closer to what you want, assuming that it is the value of the
most frequently occurring:
> apply(mat, 2, function(x) head(names(sort(table(x), decreasing=T)),5))
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] "1" "14" "5" "1" "4" "14" "6" "18" "11" "19"
[2,] "3" "3" "1
And to wrap it up and help you choose, here are four functions based
on these emails (the first one is my own slight variant):
library(ecodist)
a <- sample(1:1000, 10^4, replace = TRUE)
b <- sample(letters[1:6], 10^4, replace = TRUE)
foo1 <- function() {
x <- table(a, b)
return(x %*% t(x))
}
Hi:
To mimic Sarah Goslee's reply within base R, either of these work:
crossprod(t(as.matrix(xtabs( ~ a + b
crossprod(t(as.matrix(table(a, b
HTH,
Dennis
On Thu, Nov 4, 2010 at 12:42 PM, cory n wrote:
> Let's suppose I have userids and associated attributes... columns a and b
>
> a <-
Hi again,
Stil don't qute get it...
Here's what i did :
>mat<-read.csv("litologija.csv", dec=".", sep=";")
>apply(mat, 2, function(x) head(sort(table(x),decreasing=T),10))
With that i get a table(list/matrix...) which gives the highest count of
occurances of each value in a table (at least i
On Nov 4, 2010, at 4:24 PM, Sarah Goslee wrote:
Here's one possibility:
library(ecodist)
a <- c(1,1,1,2,2,3,3,3,3)
b <- c("a","b","c","a","d","a", "b", "e", "f")
x <- crosstab(a, b, rep(1, length(a)))
x
a b c d e f
1 1 1 1 0 0 0
2 1 0 0 1 0 0
3 1 1 0 0 1 1
x %*% t(x)
1 2 3
1 3 1 2
2 1 2
Here's one possibility:
> library(ecodist)
> a <- c(1,1,1,2,2,3,3,3,3)
> b <- c("a","b","c","a","d","a", "b", "e", "f")
>
> x <- crosstab(a, b, rep(1, length(a)))
> x
a b c d e f
1 1 1 1 0 0 0
2 1 0 0 1 0 0
3 1 1 0 0 1 1
> x %*% t(x)
1 2 3
1 3 1 2
2 1 2 1
3 2 1 4
Sarah
On Thu, Nov 4, 2010 at
Let's suppose I have userids and associated attributes... columns a and b
a <- c(1,1,1,2,2,3,3,3,3)
b <- c("a","b","c","a","d","a", "b", "e", "f")
so a unique list of a would be
id <- unique(a)
I want a matrix like this...
[,1] [,2] [,3]
[1,]312
[2,]121
[3,]2
Hi Jim,
>> The decomposition of the sum of squares should be the same regardless of
>> whether block is treated as random of fixed.
Should it? By whose reckoning? The models you are comparing are different.
Simple consideration of the terms listed in the (standard) ANOVA output
shows that this
This is a new version of glmnet, that incorporates some bug fixes and
speedups.
* a new convergence criterion which which offers 10x or more speedups for
saturated fits (mainly effects logistic, Poisson and Cox)
* one can now predict directly from a cv.object - see the help files for
cv.glmnet
On Fri, Nov 5, 2010 at 3:51 AM, Tim Hesterberg wrote:
> Faye wrote:
>>Our survey is structured as : To be investigated area is divided into
>>6 regions, within each region, one urban community and one rural
>>community are randomly selected, then samples are randomly drawn from
>>each selected ura
Hi all,
I have a matrix as given below...
year month day prec
1 1980 10 1 13.4
2 1980 10 2 0.0
3 1980 10 3 0.0
4 1980 10 4 0.0
5 1980 10 5 0.0
6 1980 10 6 0.0
7 1980 10 7 0.0
8 1980 10 8 0.0
9 1980 10 9 0.0
10 1980 10
Well, there's the obvious:
N = matrix(0,n-1,n-1)
for(i in 2:(n-1))
N[1,i] = 1/(pi * (i-1))
for(i in 2:(n-2))
for(j in i:(n-1))
N[i,j] = N[i-1,j-1]
for(i in 2:(n-1))
for(j in 1:i)
N[i,j] = -N[j,i]
- Phil Spector
I use R 2.12.0 in Windows XP.
For debugging and control I am trying to get a file with contains the
echo when code is copied into the R Gui. This works e.g. with the command:
R CMD BATCH --no-restore D:\path\script.r
then a file called script.Rout is generated in the same folder. It
contain
Hi:
This isn't very difficult if you use a little imagination. We want three
separate plots of monthly means by variable with attached error bars. This
requires faceting, so we need to create a factor whose levels are the
variable names. We also need to generate enough data to summarize by mean
an
Hi;
I have 30 data sets and I managed to take the average of a variable in each
set and put them in a vector like variable(It contains NaN data as well).
x<- matrix( list.files("C:/updated_CFL_Rad_files/2007/11",full=TRUE))
for(i in 1:30) {
radiation.data <-read.table(x[i], header = TRUE,sep = "
Hello,
I'm trying to write the following matlab code into R:
N = zeros(n-1); for i=2:(n-1)
N(1,i) = 1/(pi * (i-1));
end for i=2:(n-2)
for j=i:(n-1) N(i,j) = N(i-1,j-1);
end;
end for i=2:(n-1)
end
for j=1:i N(i,j) = -N(j,i);
end;
any suggestions?
Thanks
can i just add the following l
Hi all
how to find a function for plotting polygon surface, like
polgon3d(xc,yc,obs)
xc, yc ... coordinates
obs observations
result: persp plot with grid net over the coordinates
W.Polasek
[[alternative HTML version deleted]]
__
R-help
The following output results from fitting models using lmer and lm to
data arising from a split-plot experiment (#320 from "Small Data Sets"
by Hand et al. 1994). The data is given at the bottom of this message.
My question is why is the sum of squares for variety (V) different in
the ANOVA t
Hello,
I'm doing CDA, and want to view a plot one group at a time. How can I plot
just one group?
Example:
iris.mod <- lm(cbind(Petal.Length, Sepal.Length, Petal.Width, Sepal.Width) ~
Species, data=iris)
iris.can <- candisc(iris.mod, data=iris)
plot(iris.can)
In this example the plot shows all
Thanks Phil, that is great! I WILL try this and let you know how it goes.
On Thu, Nov 4, 2010 at 10:16 AM, Phil Spector wrote:
> Changbin -
> Does
>
>100 * sapply(matt$reads,function(x)sum(matt$reads >=
> x))/length(matt$reads)
>
> give what you want?
>
>By the way, if you want to use
Changbin -
Does
100 * sapply(matt$reads,function(x)sum(matt$reads >= x))/length(matt$reads)
give what you want?
By the way, if you want to use a loop (there's nothing wrong with that),
then try to avoid the most common mistake that people make with loops in R:
having your result grow
Thanks Martin, I will try this.
On Thu, Nov 4, 2010 at 10:06 AM, Martin Morgan wrote:
> On 11/04/2010 09:45 AM, Changbin Du wrote:
> > Thanks, Jim!
> >
> > This is not what I want, What I want is calculate the percentage of
> reads
> > bigger or equal to that reads in each position.MY output is
On 11/04/2010 09:45 AM, Changbin Du wrote:
> Thanks, Jim!
>
> This is not what I want, What I want is calculate the percentage of reads
> bigger or equal to that reads in each position.MY output is like the
> following:
Hi Changbin -- I might be repeating myself, but the Bioconductor
packages IR
HI, Henrique,
Thanks for the great help!
I compared the output from your codes:
> te<-rev(100 * cumsum(matt$reads > 1) / length(matt$reads) )
> te
[1] 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84
83
[19] 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66
On Thu, Nov 4, 2010 at 4:00 PM, Peter Davenport wrote:
> Dear R-help,
>
> Could any of you direct me to a function for plotting a grid of colours,
> directly specified by a matrix of hex colour codes? In other words I'm
> looking for a heatmap() or image()-like function to which I can specify the
Thanks, Jim!
This is not what I want, What I want is calculate the percentage of reads
bigger or equal to that reads in each position.MY output is like the
following:
for row 1, all the reads is >= 4, so the cover_per is 100,
for row 2, 99 % reads >=4, so the cover_per is 99.
> head(final)
cove
Hi,
try this,
library(grid)
grid.raster(matrix(colors(),ncol=50),interp=F)
HTH,
baptiste
On Nov 4, 2010, at 5:00 PM, Peter Davenport wrote:
> Dear R-help,
>
> Could any of you direct me to a function for plotting a grid of colours,
> directly specified by a matrix of hex colour codes? In o
Try this:
rev(100 * cumsum(matt$reads > 1) / length(matt$reads) )
On Thu, Nov 4, 2010 at 1:46 PM, Changbin Du wrote:
> HI, Dear R community,
>
> I have one data set like this, What I want to do is to calculate the
> cumulative coverage. The following codes works for small data set (#rows =
> 1
Is this what you want:
> x
id reads
1 Contig79:1 4
2 Contig79:2 8
3 Contig79:313
4 Contig79:414
5 Contig79:517
6 Contig79:620
7 Contig79:725
8 Contig79:827
9 Contig79:932
10 Contig79:1033
11 Contig79:1134
> x$percent <- x$re
Many thanks-its worked a treat :-)
Emma
--
View this message in context:
http://r.789695.n4.nabble.com/Matrix-Manipulation-tp3027266p3027307.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://st
try this:
> x
V2 V3 V4
[1,] 1 1 1
[2,] 2 2 2
[3,] 3 3 3
[4,] 4 4 4
[5,] 5 NA 5
[6,] NA NA 6
[7,] NA NA NA
> offset <- c(0,2,1)
> # add the control to the data and make two copies so we can offset
> x.new <- rbind(offset, x, x)
> result <- apply(x.new, 2, function(.col){
+ .
Dear R-help,
Could any of you direct me to a function for plotting a grid of colours,
directly specified by a matrix of hex colour codes? In other words I'm
looking for a heatmap() or image()-like function to which I can specify the
colour of each grid location directly, rather than providing a n
Hi
r-help-boun...@r-project.org napsal dne 04.11.2010 15:49:31:
> Hi all,
>
> I understand that you most of you this is a peice of cake but i am a
complete
> newbie in thisso any example would be greatly aprpeciated and also
any
> hint as how to get around in R. Frankly i sometimes see
try sqldf:
> x
Sample_no Species Nitrogen Carbon
1 1 Cod 15.2 -19.0
2 2 Haddock 14.8 -20.2
3 3 Cod 15.6 -18.5
4 4 Cod 13.2 -20.1
5 5 Haddock 14.3 -18.8
> require(sqldf)
> sqldf("select Species, avg(Nitrogen) Nitrogen, a
Hi,
Is there a quick way to go from this matrix:
> A
[,1] [,2] [,3]
[1,]111
[2,]222
[3,]333
[4,]444
[5,]5 NA5
[6,] NA NA6
[7,] NA NA NA
to this matrix:
> B
[,1] [,2] [,3]
[1,]1 NA NA
[2,]2 NA1
[3,
HI, Dear R community,
I have one data set like this, What I want to do is to calculate the
cumulative coverage. The following codes works for small data set (#rows =
100), but when feed the whole data set, it still running after 24 hours.
Can someone give some suggestions for long vector?
id
(apologies for any double hits; forgot to reply all...)
Or, you could just go back to basics, and write yourself a general loop that
goes through whatever levels of a variable and gives you back whatever
statistics you want... below is an example where you estimate means for each
level, but you co
Hi Anand,
Try creating a variable where you can store your data, and append it in your
loop. See added lines of code to include below...
On Thu, Nov 4, 2010 at 9:43 AM, Anand Bambhania wrote:
> Hi all,
>
> I am processing 24 samples data and combine them in single table called
> CombinedSamples
Hi Erik!
I googled and found that very helpful message on this adress:
http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/pdf.html
But when i type ?pdf I get directed here:
http://127.0.0.1:29358/library/grDevices/html/pdf.html
which doesn't contain that information.
Thanks for the help
I dont have the implementation in the way you want it
. Sorry
but
someone here will definitely know
The group showed me to do it this way though
.
library(zoo)
library("RCurl")
sNiftyURL =
"http://nseindia.com/content/indices/histdata/S&P%20CNX%20NIFTY01-01-2000-02
-11-2010.csv"
Nifty_Dat =
Anand Bambhania wrote:
Hi all,
I am processing 24 samples data and combine them in single table called
CombinedSamples using following:
CombinedSamples<-rbind(Sample1,Sample2,Sample3)
Please use reproducible examples.
Now variables Sample1, Sample2 and Sample3 have many different columns
Hello,
The best way to get help from people on the list is
for you to give us *reproducible* examples of exactly
what is you want.
Usually, you can come up with some sample data and code
that corresponds to your situation, and that we can run
directly by cutting and pasting from the email.
You
Just read the help page :).
This is under "Note" in the ?pdf.
On some systems the default plotting character ‘pch = 1’ is
displayed in some PDF viewers incorrectly as a ‘"q"’ character.
(These seem to be viewers based on the ‘poppler’ PDF rendering
library). This may be due
I suspect that R's help("density") will tell about
the difference between its bw and width arguments.
In Splus help("density") says about "width"
width
width of the window.
...
The standard error of a Gaussian window is width/4.
For the other windows width is the width of the in
The other way (in the same spirit as par(mfrow = ...) in base graphics) is to
use the grid.arrange function in the gridExtra package. See it's documentation
for examples.
On Nov 4, 2010, at 9:36 AM, ashz wrote:
>
> Dear All,
>
> I have this script:
>
> dat <- data.frame(Month = hstat$Date,
On 04/11/2010 10:53 AM, Luis Ridao wrote:
R-help,
I was wondering how to remove indexing from an output, e.g.,
> aVector<-1:10
> aVector
[1] 1 2 3 4 5 6 7 8 9 10
> someFunction(aVector)
1 2 3 4 5 6 7 8 9 10
The cat() function gives you lots of flexibility in how things
Faye wrote:
>Our survey is structured as : To be investigated area is divided into
>6 regions, within each region, one urban community and one rural
>community are randomly selected, then samples are randomly drawn from
>each selected uran and rural community.
>
>The problems is that in urban/rural
R-help,
I was wondering how to remove indexing from an output, e.g.,
> aVector<-1:10
> aVector
[1] 1 2 3 4 5 6 7 8 9 10
> someFunction(aVector)
1 2 3 4 5 6 7 8 9 10
Thanks in advance
[[alternative HTML version deleted]]
__
Hi all,
I understand that you most of you this is a peice of cake but i am a complete
newbie in thisso any example would be greatly aprpeciated and also any hint
as how to get around in R. Frankly i sometimes see the help files kinda
confusing.
M
-Original Message-
From: Petr PIK
Have a look at the ggplot2 website. It has a lot of examples
http://had.co.nz/ggplot2/ look at the bottom of this page for
facet_grid() and facet_wrap()
http://had.co.nz/ggplot2/facet_wrap.html direct link to facet_wrap()
--
At 01:38 AM 11/4/2010, Fei xu wrote:
Hello;
Our survey is structured as : To be investigated area is divided
into 6 regions,
within each region, one urban community and one rural community are
randomly selected,
then samples are randomly drawn from each selected uran and rural community.
Th
Hi all,
I am processing 24 samples data and combine them in single table called
CombinedSamples using following:
CombinedSamples<-rbind(Sample1,Sample2,Sample3)
Now variables Sample1, Sample2 and Sample3 have many different columns.
To make it more flexible for other samples I'm replacing above
Hi
r-help-boun...@r-project.org napsal dne 04.11.2010 14:21:38:
> Hi David,
>
> I am still having troubles with that loop ...
>
> This code gives me (kinda) the name of the column/field in a data frame.
Filed
> names are form W1-W10. But there is a space between W and a number -->
"W 10",
>
Dear Thierry,
Your solution looks very elgant but I can not find a proper example.
Can you provide me one?
Thx
--
View this message in context:
http://r.789695.n4.nabble.com/ggplot-output-tp3027026p3027108.html
Sent from the R help mailing list archive at Nabble.com.
___
Hi,
Try with RSvgDevice::devSVG()
I don't have any problems with either Inkscape or Illustrator (CS4)
HTH,
Ivan
Le 11/4/2010 15:04, Rafael Björk a écrit :
Dear R-users
When trying to import graphics from an pdf-file to a Vector graphics editor
(I use Inkscape, but i've confirmed the same prob
> Beware of facile comparisons of this sort -- they may be apples and nematodes.
And they also imply that the main time sink is the computation. In my
experience, figuring out how to solve the problem using takes
considerably more time than 18 / 1000 seconds, and so investing your
energy in learn
Dear R-users
When trying to import graphics from an pdf-file to a Vector graphics editor
(I use Inkscape, but i've confirmed the same problem on adobe products), all
points in the graphics turn out as "q"s.
This example displays the beaviour:
pdf(file="points are weird.pdf")
plot(1:5)
dev.off()
Split.screen() and par() don't work with ggplot2
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium
Research Institute for Nature and Fo
The easiest way it to create one long dataset with four variables:
Month, avg, stdev and type. Type will be either K, C or S.
Then you just need to add some facetting to your code
ggplot(data = dat, aes(x = Month, y = avg, ymin = avg - stdev, ymax =
avg + stdev)) +
geom_point() +
geom_line()
Have you tried ?split.screen
Annemarie Eigenhuis, MSc
University of Amsterdam
Department of Psychology, clinical area
Roetersstraat 15
1018 WB Amsterdam
The Netherlands
phone: +31(0)205256815
email: a.eigenh...@uva.nl
-Original Message-
From: r-help-
Dear All,
I have this script:
dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev =
hstat$C.stdev)
ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax =
C_avg + C_stdev)) +
geom_point() +
geom_line() +
geom_errorbar()
dat <- data.frame(Month = hstat$D
hello,i'm roesda from indonesia
I have trouble when they have to perform parameter estimation by MLE method
using the R programming.because, the distribution that will be used instead
of not like the distribution that already known distributions such as gamma
distribution, Poisson or binomial. th
Try tapply().
For example:
tapply(data$Nitrogen,factor(data$Species),mean)
For the Nitrogen column, the mean is calculated for each Species. (if the data
frame below is in the object data)
Regards,
Annemarie Eigenhuis
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-he
On Nov 4, 2010, at 9:21 AM, Matevž Pavlič wrote:
Hi David,
I am still having troubles with that loop ...
This code gives me (kinda) the name of the column/field in a data
frame. Filed names are form W1-W10. But there is a space between W
and a number --> "W 10", and column (field) names d
Hi David,
I am still having troubles with that loop ...
This code gives me (kinda) the name of the column/field in a data frame. Filed
names are form W1-W10. But there is a space between W and a number --> "W 10",
and column (field) names do not contain numbers.
>for(i in 1:10)
>{
>vari <-
1 - 100 of 126 matches
Mail list logo