On Thu, Mar 31, 2011 at 4:01 AM, Simon Kiss wrote:
> Dear colleagues,
> I'm working with the 2008 Canada Election Studies
> (http://www.queensu.ca/cora/_files/_CES/CES2008.sav.zip), trying to construct
> a weighted national sample using the survey package.
> Three weights are included in the nat
You've tried:
shell("ATTRIB +H C:\\your_file_name")
?
On Wed, Mar 30, 2011 at 12:59 PM, Chuanlong Du wrote:
> Hello!
>
> Does any one know how to modify attributes of files (hide, read only and
> etc) in Windows Systems using R? I tried to use shell to call system
> command, but it seems that
Try this:
`%a%` <- function(x, y)paste(x, y, sep = ',')
2 %a% 3
On Wed, Mar 30, 2011 at 1:04 PM, Chuanlong Du wrote:
> Hello, everyone!
>
> Does anyone know how make some symbols have special means in R? For example,
> we know that "+" in R means the sum of the two operand on its left and
> ri
Henrique, this is great, thank you!
It's almost what I was looking for! Only one small thing - it doesn't
"merge" the results for weeks that "straddle" 2 years. In my example -
last week of year 2008 and the very first week of 2009 are one week.
Any way to "join them"?
Asking because in reality I'
On Wed, 30 Mar 2011, Achim Zeileis wrote:
On Wed, 30 Mar 2011, Erich Neuwirth wrote:
Achim
I simply want to replace the font R uses on mosaic (whatever it is)
by a font of my choice (say Calibri or Arial)
because I need to embed the R charts in a PowerPoint
presentation and want the fonts to m
I'm pleased to announce that the FuncMap (v 1.0) package is available
on CRAN.
This is a single function package that makes hive plots of function
calls for a specified package. Hive plots are a powerful concept
developed by Martin Krzywinski at the Genome Sciences Center
(mkweb.bcgsc.ca/
I'm pleased to announce that the ChemoSpec package is available on
CRAN for the first time (as version 1.46-4).
ChemoSpec is a collection of functions for plotting spectra (NMR, IR
etc) and carrying out various forms of top-down exploratory data
analysis, such as HCA, PCA and model-based clu
I'm struggling with package XML to parse a Garmin file (named *.tcx).
I wonder if it's form is incomplete, but appreciably reluctant to paste
even a shortened version.
The output below shows I can get nodes, but an attempt at value of a
single node comes up empty (even though there is data there.
Hi,
For most purposes, I find that R graphics get 95% of the work done
towards final publication. A couple of personal comments,
- lattice, ggplot2, RColorBrewer, evidently. ggplot2, in particular,
makes really good aesthetic decisions by default.
- whilst R devices are really good, I find there
Hi,
Also, try this and rm() it immediately,
`+` <- function(x, y) x - y
1+1
rm(`+`)
1+1
baptiste
On 31 March 2011 05:04, Chuanlong Du wrote:
> Hello, everyone!
>
> Does anyone know how make some symbols have special means in R? For example,
> we know that "+" in R means the sum of the two ope
Here is a way of taking a sequence of dates and breaking them into
weeks that start on Monday (you can change it) and it will span across
years:
> # create a couple of years of dates
> x <- seq(as.Date('2009-7-8'), as.Date('2012-3-7'), by = '1 day')
> # determine when the Monday for the first date
On Mar 30, 2011, at 11:02 AM, Chuanlong Du wrote:
Hello, everyone!
Does anyone know whether there's a function in R which can save the
content
in R console to some file? I'm using Windows system and the usual R
console
instead of Rstudio.
You might want to look at :
?capture.output
?si
Try this:
library(zoo)
wk <- as.numeric(format(myframe$dates, '%W'))
is.na(wk) <- wk == 0
aggregate(value ~ group + na.locf(wk), myframe, FUN = sum)
On Wed, Mar 30, 2011 at 4:35 PM, Dimitri Liakhovitski
wrote:
> Henrique, this is great, thank you!
>
> It's almost what I was looking for! Only o
Here is a more complete solution to my problem.
The fact that the parameters are called gp_varnames,
gp_labels, and gp_text on one hand, but main_gp and
and sub_gp on the other hand comes as a surprise
when one tries to find a solution.
windowsFonts(calibri = windowsFont("Calibri"))
mosaic(UCBAdm
'+' is a generic function, so different methods can be defined
for different classes of objects. Consider the following:
methods('+')
[1] +.Date +.POSIXt # Methods defined for 'Date' and 'POSIXt' objects
> args('+.Date') # standard argument names are e1 and e2
function (e1, e2)
NULL
Hi Michael
Almost certainly, the problem is that the document has a default namespace.
You need to identify the namespace in the XPath query.
xpathApply() endeavors to make this simple:
xpathApply(doc2, "//x:TotalTimeSeconds", xmlValue, namespaces = "x")
I suspect that will give you back some
Yes, zoo! That's what I forgot. It's great.
Henrique, thanks a lot! One question:
if the data are as I originally posted - then week numbered 52 is
actually the very first week (it straddles 2008-2009).
What if the data much longer (like in the code below - same as before,
but more dates) so that
You're right:
wk <- as.numeric(format(myframe$dates, "%Y.%W"))
is.na(wk) <- wk %% 1 == 0
solution<-aggregate(value ~ group + na.locf(wk), myframe, FUN = sum)
On Wed, Mar 30, 2011 at 6:10 PM, Dimitri Liakhovitski
wrote:
> Yes, zoo! That's what I forgot. It's great.
> Henrique, thanks a lot! One
Henrique, this is beautiful, thank you so much.
This is a great and correct solution.
A stupid question: what does the line is.na(wk) <- wk %% 1 == 0 do?
Thank you!
Dimitri
On Wed, Mar 30, 2011 at 5:25 PM, Henrique Dallazuanna wrote:
> You're right:
>
> wk <- as.numeric(format(myframe$dates, "%Y
This puts 'NA' in the first week of the year.
Take a look on the code below:
2009.52 %% 1
On Wed, Mar 30, 2011 at 6:35 PM, Dimitri Liakhovitski
wrote:
> Henrique, this is beautiful, thank you so much.
> This is a great and correct solution.
>
> A stupid question: what does the line is.na(wk) <
Dear Deepayan,
thanks for answering. It's never too late to be useful.
I see your point in the minimal example. I checked the z-axis limits in my
original problem for the point to be inside and it wasn't there. I can't easily
reproduce it from the minimal example though. I'll get back to you if I
Dear list,
I am new to R and trying to create a grouped (four groups) scatter plot
with error bars (only in y-direction) using the scatterplot() function
from the car package.
The code I am using for plotting the scatter plot is:
scatterplot(a$s_profile~a$s_plot | a$group, data=a)
which gives
Hi
On 30/03/2011 10:54 p.m., Mario Valle wrote:
Hello!
Suppose I have three charts like below. The top chart is a general
overview and the bottom charts are related so some point of this chart.
To make clear this relationship I want to draw a line between (4,0.9) in
the top chart and (10,1) in t
On Mar 30, 2011, at 5:10 PM, philsen wrote:
Dear list,
I am new to R and trying to create a grouped (four groups) scatter
plot with error bars (only in y-direction) using the scatterplot()
function from the car package.
The code I am using for plotting the scatter plot is:
scatterplot(a$s
Thank you Ista.
On Wed, Mar 30, 2011 at 5:42 PM, Ista Zahn-2 [via R]
wrote:
> Use facetting:
>
> sets <- rbind(cbind(set="set1", set), cbind(set="set2", set2))
> ggplot(sets, aes(x = time, y = hours)) +
> Â geom_area(colour = 'red', fill = 'red', alpha = 0.5) +
> Â geom_area(stat = 'smooth', sp
Hi,
you may overwrite existing opreators in the current environment
for example:
> `+` <- `*`
> 2+3
[1] 6
Regards!
On Wed, Mar 30, 2011 at 10:04:19AM -0600, Chuanlong Du wrote:
> Hello, everyone!
>
> Does anyone know how make some symbols have special means in R? For example,
> we know that
You can use "Save history..." from the R-Console.
Greetings ep
--
View this message in context:
http://r.789695.n4.nabble.com/Is-there-a-function-to-save-the-content-in-R-console-to-some-file-tp3419138p3419499.html
Sent from the R help mailing list archive at Nabble.com.
___
On Mar 30, 2011, at 2:35 PM, Dimitri Liakhovitski wrote:
Henrique, this is great, thank you!
It's almost what I was looking for! Only one small thing - it doesn't
"merge" the results for weeks that "straddle" 2 years. In my example -
last week of year 2008 and the very first week of 2009 are o
Here's my modest contribution:
smode<-function(x){
xtab<-table(x)
modes<-xtab[max(xtab)==xtab]
mag<-as.numeric(modes[1]) #in case mult. modes, this is safer
themodes<-names(modes)
mout<-list(themodes=themodes,modeval=mag)
return(mout)
}
(I
Hi R-users,
I have a list containing numeric tables of differing row length. I want to make
a new list that contains only rows from tables with a "Sum" greater than 3,
plus the names of each table. I was wondering whether there is an elegant way
to do this using apply of related functions as th
I was cursing Matlab again today (what else is new) because the default
action for every Matlab command is to spew the result to the console,
and one must remember to put that darn ";" at the end of every line.
So I just wondered: was there ever a discussion as to providing some
modified ver
On Mar 30, 2011, at 5:38 PM, Herbert, Alan G wrote:
Hi R-users,
I have a list containing numeric tables of differing row length. I
want to make a new list that contains only rows from tables with a
"Sum" greater than 3, plus the names of each table. I was wondering
whether there is an el
Hi Carl,
Well, we already have
(newobject <- somefunction()), so wrote:
> I was cursing Matlab again today (what else is new) because the default
> action for every Matlab command is to spew the result to the console, and
> one must remember to put that darn ";" at the end of every line.
>
> So
On Wed, Mar 30, 2011 at 5:10 PM, Dimitri Liakhovitski
wrote:
> Yes, zoo! That's what I forgot. It's great.
> Henrique, thanks a lot! One question:
>
> if the data are as I originally posted - then week numbered 52 is
> actually the very first week (it straddles 2008-2009).
> What if the data much
Dear Carl,
I think that the following does what you want:
> `%<-%` <- function(e1, e2){
+ e1 <- deparse(substitute(e1))
+ env <- parent.frame()
+ assign(e1, e2, envir=env)
+ e2
+ }
> x %<-% 10
[1] 10
> x
[1] 10
But, as has been pointed out, it's probably easier just to parenthesize the
The %...% operators are not a panacea.
they have the same precedence as `*`
and `/` (I think) so you get things like:
> x %<-% 10 - 8 # %<-% has higher precedence than -
[1] 2
> x # not what you thought it would be
[1] 10
> x %<-% 10 ^3 # but lower than ^
[1] 1000
> x # this is wha
Try this:
lapply(l, function(x)x[x[,'Sum'] == 3,])
On Wed, Mar 30, 2011 at 7:38 PM, Herbert, Alan G wrote:
> Hi R-users,
>
> I have a list containing numeric tables of differing row length. I want to
> make a new list that contains only rows from tables with a "Sum" greater than
> 3, plus the
Dear R list,
I'm trying to create an object of class "owin" (observation window) in the
package spatstat from GIS mapping data. Here's an example of my problem.
Everything
goes well until the last line of code. I get the error message shown at the
bottom:
library(spatstat)
library(sp)
library(mapt
On Mar 30, 2011, at 7:27 PM, Henrique Dallazuanna wrote:
Try this:
lapply(l, function(x)x[x[,'Sum'] == 3,])
If this is the right answer, you should send a "solved" message. The
dput extract was incomplete.
--
David.
On Wed, Mar 30, 2011 at 7:38 PM, Herbert, Alan G
wrote:
Hi R-users
The problem has been resolved thanks to Tom Callaway from Redhat:
Tom Callaway wrote:
>
> Looking at the R source code, it uses Cairo to do the SVG creation, and
> the Cairo in RHEL-5 is very (very) old (1.2.4).
>
> Digging through Cairo's changelogs post 1.2.4, I came across this:
>
> "SVG: F
Hello, I am trying to read an Excel file using RODBC connect (its attached)
using the following code:
Data<-odbcConnectExcel2007('acciones_col.xlsx',readOnly=T,)
datos<-sqlFetch(Data,'Bloomberg')
odbcClose(Data)
The file contains stock data downloaded from bloomberg, and it contains five
va
Is there R code that can do a Poisson Regression and plot the density of the
fitted values?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read t
Jim Silverton gmail.com> writes:
>
> Is there R code that can do a Poisson Regression and plot the density of the
> fitted values?
>
?glm
glm(...,family=poisson)
?predict.glm
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
Hi all!
I've written a handy script that uses a for loop to allow me to generate a
large number of figures and statistical outputs for a large dataset.
I am using indexing to retrieve a species name for the title of my graphs-
which worked fine. However, I need to italicize these species names.
I have a very large dataset with three variables that I need to graph using
a scatterplot. However I find that the first variable gets masked by the
other two, so the graph looks entirely different depending on the order of
variables. Does anyone have any suggestions how to manage this?
This code
Hello List.
I have many files of ECG, each one with 7 column and I need only the
second column and the name of each ECG. I am doing this but althought
I have various days trying this i haven't gotten, so I ask help with
this, if somebody cans help me I'll be so thankfully.
---
101 - 146 of 146 matches
Mail list logo