Hi,
i have some data in a matrix. It has zero values scattered throughout, at
random.
I'd like to create a line plot, with a line for each row, that *excludes* the
zero or NA values.
The data looks like this (toy example)
10 12 21 0 23 0 43 0 NA 41
0 0 0 34 35 0 35 0 44 0
NA NA NA 3 2 5 0 3
Succinct is good, but reproducible is even more important.
Think ?dput or ?sample so we have some data like you do, your current
algorithm, or at least a desired output example (again using dput)
---
Jeff Newmiller
I want to use tryCatch, but tryCatch seems to obscure important things I
need for debugging.
For example, say I am working with an SQLite database, and have written
this function:
debugThisFunction <- function(dbfile) {
require(RSQLite)
drv <- SQLite()
conn <- dbConnect(drv, dbfile)
tryCa
Is it a timeSeries object or a ts object -- those are different
things... either way, you probably need to convert it to an xts
object, this can be done pretty easily with as.xts()
Michael
On Fri, Mar 16, 2012 at 6:22 PM, suckerpunch wrote:
> Hi,
>
> I'm new to R and Quantmod. I'm trying to make
I have got a solution worked for me. Make the follow steps in Administration
mode (in Win7 right click on ikon -> Run as administrator), then in Tinn-R:
R -> Configurate -> Permanaent.
Than delete the # mark from the UK and Brasil repository. Like this:
Run with hand all of the line (not just the
hi
Can it be possible to make font in "paste" function large or small, diffent
color and bold?
for example,
m<-function(x){
if(x==11){
print(paste(" A. Result"),quote=F) # I want to make
this string bold and diffent color
print(paste(" It confirm that there is
Hi,
I'm new to R and Quantmod. I'm trying to make use of Quantmod's features
however I'm failing at the first hurdle and I'm finding most R documentation
a little cryptic.
I have some minutely data for the same day for a stock in an existing
timeSeries (ts) object. For example:
Date
Thanks much.
--
View this message in context:
http://r.789695.n4.nabble.com/Y-axis-label-on-the-right-hand-side-in-lattice-tp4478959p4479614.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat
Another question: how do I ensure rJava is bytecode-compiled? I seem
to re-install the package with setting compilePKGS(T) before i install
it again, but most of rJava functions however seem to come back still
as not bytecode-compiled.
Thank you in advance.
-dmitriy
On Fri, Mar 16, 2012 at 3:48 P
If the OP just wants the last fitted value, use fitted():
dats <- data.frame(x = 1:100, y = rnorm(100))
num.runs <- 21
fitvec <- numeric(num.runs)
for(i in seq_len(num.runs)){
fits <- fitted(lm(y ~ x, data = dats[1:(80+i-1), ]))
fitvec[i] <- tail(fits, 1)
}
Peter Ehlers
On 2012-03-16 14:0
I don't have access to h_raster so I can't reproduce your script
exactly; leaving the annotation_raster() part out seems to work ok.
dput() may be helpful for sending data.
Also, what's your sessionInfo()?
Michael
On Fri, Mar 16, 2012 at 4:59 PM, Hasan Diwan wrote:
> Not sure if this is the rig
Here is a solution that looks for the line with 7 elements and inserts
the quotes:
> fileName <- '/temp/text.txt'
> input <- readLines(fileName)
> # count the fields to find 7
> nFields <- count.fields(fileName, sep = ',')
> # now fix the data
> for (i in which(nFields == 7)){
+ # split on co
The "low level" seems to be much-much better though... not sure why
the difference would be so fundamental...
f <- function() system.time( for( i in 1:1000)
.jcall("java/lang/Math", returnSig="D", "abs", as.numeric(i) ) )
> f()
user system elapsed
0.080 0.000 0.083
On Fri, Mar 16, 2012
On 03/16/2012 12:23 PM, Sarah Goslee wrote:
There's almost certainly a better way, but I'd be more inclined to look for
it if you'd provide a small reproducible example so I could actually try it.
Without knowing the structure of your data, it's very hard to offer
alternatives.
Sarah
On Fri, Ma
On 03/16/2012 12:31 PM, William Dunlap wrote:
You didn't show your complete code but the following may help you speed things
up.
Compare a function, f0, structured like your code and one, f1, that calls sum
once
instead of counting length(x)-3 times.
f0<- function(x, test.pattern) {
count
yes,
xyplot(y ~ x, par.settings=list(layout.widths=list(ylab.right=5,
right.padding=0)))
See trellis.par.get("layout.widths")
for the full set of names and default values
On Fri, Mar 16, 2012 at 6:01 PM, Saptarshi wrote:
> ylab.right is perfect. However, I am drawing scales on the right axis
PS caching reference to the class doesn't change anything fundamentally:
clazz <- J("java.lang.Double")
system.time( for( i in 1:1000) clazz$ parseDouble(as.character(i)))
user system elapsed
3.788 0.000 3.790
Java parsing is slow??? nope, still looking pretty appalling for what it does
ylab.right is perfect. However, I am drawing scales on the right axis
(outside) (see code 1).
When ylab.right is set to something it overlaps with the scale labels.
see http://imgur.com/Gs3JS
I seem to have asked the question:
http://tolstoy.newcastle.edu.au/R/e5/help/08/09/1887.html
But the sam
Hi All,
I encounter a problem of losing control of SQL when I use sqlQuery function
to command SQL. My problem is like:
library(RODBC)
ch <- odbcConnect("ASQLTable")
sqlQuery(ch, paste("
create table #MyTest( MyTest1 int, MyTest2 int, MyTest3 int, MyTest4 int,
MyTest5 int)
"))
for (i in 2){
s
Hello,
I am getting pretty poor rJava call performance
> system.time(for (i in 1:1000)
> J("java.lang.Double")$parseDouble(as.character(i)))
user system elapsed
4.884 0.000 4.900
i.e. 5 milliseconds per very simple call on a very fast cpu. JNI calls
themselves are said to be pretty
How I wish it were but sadly its not. I have a bad habit of wanting my
code to look elegant but still readable.
On Fri, Mar 16, 2012 at 11:14 AM, Ranjan Maitra wrote:
> Wonder if this is part of some assignment with points on elegance
> of code. Sort of when I teach a class..
>
>
> On Fri, 16
On 3/16/2012 10:29 AM, mdvaan wrote:
Hi,
This is probably an easy one, but I am new to ggplot2 and cannot find an
answer online.
Just so you know, there is a mailing list devoted to ggplot2. You can
subscribe and view messages at
https://groups.google.com/forum/?fromgroups#!forum/ggplot2
Hi there,
First off, despite this being my first post here, I have scanned the R help
forums a lot in the past few months to help with some questions, so a big thank
you to the community as a whole for being so helpful!
I'm somewhat of an R newbie, and have run up against a problem that I can't
Thanks! Exactly what i need
Saptarshi
--
View this message in context:
http://r.789695.n4.nabble.com/Changing-axis-labels-depending-on-panel-in-lattice-tp4478854p4479368.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project
You can use predict() just as you would anywhere else:
for(i in 80:100){
predict(lm(y ~ x, data = dats[1:i, ]), newdata = ???)
}
Michael
On Fri, Mar 16, 2012 at 8:12 AM, pie' wrote:
> hey,
>
>
> thanks for the hint. I too figured I'd have to write a for-loop. I have the
> problem now of how
Not sure if this is the right place to report this, but:
Am using ggmap to generate a map of a bounding box from 161
latitude/longitude pairs and the code crashes R (in ess). Data is at
http://analysis.d8u.us/~hdiwan/plotSource.csv and the code to read it
is below. I'm not sure if ess, emacs, ggma
Hi,
This is probably an easy one, but I am new to ggplot2 and cannot find an
answer online.
I am bar plotting values of 10 groups. These values are all within a 90-100
range, so I would like leave out the area of the bars below 90. If I say
"graph + scale_y_continuous(limit=c(90, 100))", it does
I am using following codes to plot map
library(sp)
library(rgdal)
library(maps)
library(gplots)
library(clim.pact)
library(fields)
source("/R/PlotGridded2DMap.R")
source("/R/image.plot.fix.R")
source("/R/image.plot.plt.fix.r")
seasonal_plot<-function(input,lonll=-180,latll=-90,lonres=5.,latres=3
Ok. When I type in sudo add-apt-repository ppa:marutter/rrutter
I get a prompt for a password. I enter my domain password and
get some print about adding the ppa and requeting that I press
enter. I press enter and this is followed by print stating that
the key B04C661B is being requested from h
Q #1: yesterday:
A: 1. Restructure your database with NoSQL. See MongoDB.org.
2. Choose application language with which to work (and get Driver)
and write your code.
3. R package - rmongodb.
__
R-help@r-project.org mailing list
https://stat.eth
On 3/15/2012 4:11 PM, tibaker wrote:
Hi
When I run my script using ggplot and geom_smooth I get messages that I
would like to suppress:
p<- ggplot(dataSubset)
p<- p + aes(x = as.Date(factor(key),format="%Y%m%d")) + geom_line()
p<- p + geom_smooth(span=0.2,se=FALSE,size=0.7)
The messages look l
On 16/03/12 23:02, Lucie V wrote:
Dear R users,
I wish to run spatial point pattern analysis (e.g. pair correlation function,
mark correlation function) for which I need to create an observation window
(window=owin) from which the spatial analysis is generated. The command I used
to create th
On Mar 16, 2012, at 3:03 PM, David Winsemius wrote:
On Mar 16, 2012, at 2:53 PM, Richard M. Heiberger wrote:
from ?xyplot
use the
ylab.right
argument
On Fri, Mar 16, 2012 at 2:11 PM, Saptarshi Guha >wrote:
Hello,
Is there a way to add ylab on the right hand side also (in lattice)?
D
On Mar 16, 2012, at 2:53 PM, Richard M. Heiberger wrote:
from ?xyplot
use the
ylab.right
argument
On Fri, Mar 16, 2012 at 2:11 PM, Saptarshi Guha >wrote:
Hello,
Is there a way to add ylab on the right hand side also (in lattice)?
Different from the left hand side?
I thought he wante
from ?xyplot
use the
ylab.right
argument
On Fri, Mar 16, 2012 at 2:11 PM, Saptarshi Guha wrote:
> Hello,
>
> Is there a way to add ylab on the right hand side also (in lattice)?
> Different from the left hand side?
>
> Cheers
> Saptarshi
>
>[[alternative HTML version deleted]]
>
> _
I have a file that is 5000 records and to edit that file is not easy.
Is there any way to line 10 differently to account for changes in the
third field?
On Fri, Mar 16, 2012 at 11:35 PM, Peter Ehlers wrote:
> On 2012-03-16 10:48, Ashish Agarwal wrote:
>>
>> Line 10 has City and State that too sep
Hello,
Is there a way to add ylab on the right hand side also (in lattice)?
Different from the left hand side?
Cheers
Saptarshi
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-h
Dear Gabor,
Thank you so much for your help! Your suggested code worked!
I have a couple of questions. I'm trying to understand your code so I
can use it in future programming needs. First, my understanding of the
first line of your code is that it creates an R function "EigenValues"
that
On 2012-03-16 10:48, Ashish Agarwal wrote:
Line 10 has City and State that too separated by comma. For line 10
how can I read differently as compared to the other lines?
Edit the file and put quotes around the city-state combination:
"Raleigh, North Carol"
Also: always run count.fields() on y
I just want the weighted sum of all the cases where either route is found in
VEHx and the other is found in the previous or subsequent variable. The only
examples I can think of producing are the following:
#
> OBDataSumm <- read.spss("P:/Data/OBSurveys/OBSurvey-2010-2011/Final Delivery,
> Met
Line 10 has City and State that too separated by comma. For line 10
how can I read differently as compared to the other lines?
On Fri, Mar 16, 2012 at 10:59 PM, David Winsemius
wrote:
>
> On Mar 16, 2012, at 1:11 PM, Ashish Agarwal wrote:
>
>> I want to import this CSV file into R.
>>
>> The CSV
On Mar 16, 2012, at 1:34 PM, Saptarshi Guha wrote:
Hello,
I am lattice scatterplot that has 2 panels (could be a few more). Both
panels have a y-axis label that is different on the
left and right sides. However the right hand side axis labelling
depends on
which panel i'm in .
(I am plotti
Hello,
I am lattice scatterplot that has 2 panels (could be a few more). Both
panels have a y-axis label that is different on the
left and right sides. However the right hand side axis labelling depends on
which panel i'm in .
(I am plotting two curves in one panel, the left y-axis has the scale
You didn't show your complete code but the following may help you speed things
up.
Compare a function, f0, structured like your code and one, f1, that calls sum
once
instead of counting length(x)-3 times.
f0 <- function(x, test.pattern) {
count <- 0
for(indx in seq_len(length(x)-3)) {
On Mar 16, 2012, at 1:11 PM, Ashish Agarwal wrote:
I want to import this CSV file into R.
The CSV file is
,,,1968,21,0
,,Boston,1968,13,0
,,Boston,1968,18,0
,,Chicago,1967,44,0
,,Providence,1968,17,0
,,Providence,1969,48,0
,,Binky,1968,24,0
,,Chicago,1968,23,0
,,Dally,1968,7,0
,,Raleigh, Nort
There's almost certainly a better way, but I'd be more inclined to look for
it if you'd provide a small reproducible example so I could actually try it.
Without knowing the structure of your data, it's very hard to offer
alternatives.
Sarah
On Fri, Mar 16, 2012 at 12:59 PM, Walter Anderson wrote
On Mar 16, 2012, at 12:20 PM, none wrote:
I forgot to attach the problem data, 'quadprog.Rdata' file, in my
prior email.
Please read the Posting Guide's description of what kind of
attachments the mail-server will accept.
--
David Winsemius, MD
West Hartford, CT
I want to import this CSV file into R.
The CSV file is
,,,1968,21,0
,,Boston,1968,13,0
,,Boston,1968,18,0
,,Chicago,1967,44,0
,,Providence,1968,17,0
,,Providence,1969,48,0
,,Binky,1968,24,0
,,Chicago,1968,23,0
,,Dally,1968,7,0
,,Raleigh, North Carol,1968,25,0
Addy ABC-Dogs Stars-W8.1,,Providence,
hi
i want to analyze Right Censore-Length bias data under cox model with covariate.
what is the package ?
tank you.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do r
Dear R People:
I'm not sure if I should ask this here or in Rcpp, but I thought I'd
start here first.
If I'm writing a C program, when do I know to use SEXP vs. int or float, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University o
Using the singleton pattern in R has never occurred to me so far, as
I think it applies to languages that support multiple references to
one instance. R doesn't do that, at least not in ways that would be
required for applying the singleton pattern as described in the GoF book,
anyway. One would ha
David Cassany transmuralbiotech.com> writes:
>
> Hi all,
>
> I know it may not have much sense thinking about a Singleton Pattern in an
> R application which doesn't use any OOP facilities, however I'm curious to
> know if anybody faced the same issue. I've been googling but using
> "singleton
I forgot to attach the problem data, 'quadprog.Rdata' file, in my prior
email.
I want to report a following error with quadprog. The solve.QP function
finds a solution to the problem below that violates the last equality
constraint. I tried to solve the same problem using ipop from kernlab
pack
I am working on a simulation where I need to count the number of matches
for an arbitrary pattern in a large sequence of binomial factors. My
current code is
for(indx in 1:(length(bin.05)-3))
if ((bin.05[indx] == test.pattern[1]) && (bin.05[indx+1] ==
test.pattern[2]) && (bin.05[ind
What do you mean by Mixed? If a field has a comma, then it is
supposed be to enclosed in quotes. You could preprocess the file
looking for cases where there are more fields than there there are
supposed to be, and if they are always in the same place, you could
enclose them in quotes and then rep
Since no one else has "bit", I'll take a stab. I'm an experienced R person,
but I've recently been teaching myself objective-c and I've been using
singletons quite a bit (and mis-using them quite a bit!). Not a computer
scientist at all. You've been warned.
I don't think there is a comparabl
Wonder if this is part of some assignment with points on elegance
of code. Sort of when I teach a class..
On Fri, 16 Mar 2012 10:02:48 -0400 Raphael Fraser
wrote:
> Thank you all. Your responses were very helpful.
>
> Raphael
>
> On Fri, Mar 16, 2012 at 5:04 AM, Daniel Nordlund
> wrote:
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
> Using setTimeLimit(transient = TRUE) is slightly simpler here.
Brian,
I thought I should have been able to use transient=TRUE instead of the
on.exit(setTimeLimit()) but that gave me an unwanted error report after
the top-level expression
plot(codon3 ~ codon1, data = table) should work but I'm not in a position to
verify. If for some reason it doesn't does
plot(codon3 ~ codon1, data = as.data.frame(table))
get it?
Michael
On Mar 16, 2012, at 10:32 AM, aoife doherty wrote:
> Hey guys, can anyone help?
>
> i have a sample tabl
But unfortunately it did not work for me. I am using R-2.14.2 with
windows 7 home basic
Thanks,
On Fri, Mar 16, 2012 at 8:26 PM, Duncan Murdoch
wrote:
> On 16/03/2012 10:35 AM, Christofer Bogaso wrote:
>>
>> No no, I meant to say the console window, where we type the syntax etc.
>>
>> BTW, what
On 16/03/2012 10:35 AM, Christofer Bogaso wrote:
No no, I meant to say the console window, where we type the syntax etc.
BTW, what is the official name of this window?
I think "console window" is good enough.
Duncan Murdoch
Thanks,
On Fri, Mar 16, 2012 at 8:15 PM, Duncan Murdoch
wrote:
>
Duncan's suggestion worked for me. What about it didn't work for you?
Kevin
On Fri, Mar 16, 2012 at 9:35 AM, Christofer Bogaso <
bogaso.christo...@gmail.com> wrote:
> No no, I meant to say the console window, where we type the syntax etc.
>
> BTW, what is the official name of this window?
>
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 16/03/12 15:05, Sarah Goslee wrote:
>>> It's also a really good reason to use [[ in functions or anywhere there
>>> might be a chance
>>> of confusion.
>>
>> Absolutely - I think I have to change my habit. I always prefered using $ as
>> it seeme
Sarah Goslee gmail.com> writes:
>
> R: lots of ways to do the same thing, but some of them are booby-trapped.
Fortune candidate!
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
No no, I meant to say the console window, where we type the syntax etc.
BTW, what is the official name of this window?
Thanks,
On Fri, Mar 16, 2012 at 8:15 PM, Duncan Murdoch
wrote:
> On 16/03/2012 10:23 AM, Christofer Bogaso wrote:
>>
>> Dear all, when I start R, I want that the console window
I found this useful:
http://research.stowers-institute.org/efg/R/Color/Chart/ColorChart.pdf
HTH,
-- David
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of FJ M
Sent: Wednesday, March 14, 2012 3:39 PM
To: totang...@gmail.com; R
Subj
Hey guys, can anyone help?
i have a sample table:
>table <- structure(c(4, 7, 0.2, 3, .1, 7, 222, 3, 10, 5, 11,
8, 8, 10, 7), .Dim = c(5L, 3L), .Dimnames = list(c("gene1",
"gene2", "gene3", "gene4", "gene5"), c("codon1", "codon2",
"codon3")))
>table
codon1 codon2 codon3
gene14.0
On 16/03/2012 10:23 AM, Christofer Bogaso wrote:
Dear all, when I start R, I want that the console window should be in
the Maximized size automatically. Can somebody help me how to achieve
that?
If you are working in Windows and starting R by clicking on the
shortcut, just change the "Run:" pr
Dear all, when I start R, I want that the console window should be in
the Maximized size automatically. Can somebody help me how to achieve
that?
Thanks and regards,
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
Hello I am looking for a special plot.
Let's suppose I have *100 days and
*each day I have a (1D)
distribution of the same variable.
I would like to plot
*dates on x axis and
*one distribution per date on the y axe. Do you know a way of doing it ?
Chee
Hi everybody,
Pascal, your script works again but I want to calculate the LR otherwise.
I know the likelihood ratio is linked at the roc curve and so there are
different ways to calculate the LR.
The slope of an ROC curve can be defined in three ways:
(1) as the tangent at a particular point on th
On Mar 16, 2012, at 9:46 AM, mari681 wrote:
Ok, before I definetly give up, and throw the laptop out of the
window, or
fill my data.frame manually, I'll ask for some help.
I have a data.frame named MyTable with 3 columns, that looks like
this:
V1 V2
Le vendredi 16 mars 2012 à 06:46 -0700, mari681 a écrit :
> Ok, before I definetly give up, and throw the laptop out of the window, or
> fill my data.frame manually, I'll ask for some help.
> I have a data.frame named MyTable with 3 columns, that looks like this:
> The elements on the first colum
On Mar 16, 2012, at 5:51 AM, zhu free wrote:
Hi everyone,
I have a question for R code to merge.
Say I have two dataframes:
File1 is:
V1V2V3V4
1100101name1
2200201name2
2300301name3
3400401name4
3500501name5
4600601
>> It's also a really good reason to use [[ in functions or anywhere there
>> might be a chance of
>> confusion.
>
> Absolutely - I think I have to change my habit. I always prefered using $ as
> it seemed to me more
> logical.
I started out that way because it's shorter and nicer-looking code,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 16/03/12 14:54, Sarah Goslee wrote:
> Hi Rainer,
>
> On Fri, Mar 16, 2012 at 9:45 AM, Rainer M Krug wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>>
>> Hi
>>
>> I have the following code:
>>
>> x <- data.frame(x1=1, x2=2, y1=3) x$y [1
Thank you all. Your responses were very helpful.
Raphael
On Fri, Mar 16, 2012 at 5:04 AM, Daniel Nordlund
wrote:
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>> On Behalf Of Pascal Oettli
>> Sent: Friday, March 16, 2012 12:36 AM
>> T
Hi Rainer,
On Fri, Mar 16, 2012 at 9:45 AM, Rainer M Krug wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi
>
> I have the following code:
>
> x <- data.frame(x1=1, x2=2, y1=3)
> x$y
> [1] 3
> x$x
> NULL
>
> I was surprised (and definitely irritated?) when I realised that partia
Ok, before I definetly give up, and throw the laptop out of the window, or
fill my data.frame manually, I'll ask for some help.
I have a data.frame named MyTable with 3 columns, that looks like this:
V1 V2 V3
red-jappearanceblood-n 105.032
red-j appear
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi
I have the following code:
x <- data.frame(x1=1, x2=2, y1=3)
x$y
[1] 3
x$x
NULL
I was surprised (and definitely irritated?) when I realised that partial
matching also works for
the $. Is this intended?
I assume the reason is that $ is in
R. Michael Weylandt gmail.com> writes:
>
> I can reproduce the OP's problem with ggplot 0.9.0 but I don't know
> how to solve it: perhaps you should take this to the ggplot2 mailing
> list: https://groups.google.com/group/ggplot2?pli=1
>
> Michael
>
> On Fri, Mar 16, 2012 at 4:17 AM, Bart6114
Try this -- use matrices instead of dataframes if you want speed:
> p<-data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10),d=rnorm(10))
> test<-data.frame(a=rnorm(1),b=rnorm(1),c=rnorm(1),d=rnorm(1))
>
> result<-list()
> for(i in 1:nrow(p)){
+ result[[i]]<-sum((p[i,]-test)^2)
+ }
>
> result_1<-unlist(r
Hi Gianni,
Thank you for the reproducible example!
Try
mydf$newID <- with(mydf, gsub("_", "Sample", ID))
mydf
HTH,
Jorge.-
On Fri, Mar 16, 2012 at 7:54 AM, gianni lavaredo <> wrote:
> Dear Researchers,
>
> I have a data.frame with 2 columns like this:
>
> mydf <-
>
> data.frame(value=c(1,2,3
Hi mrzung46,
Try
cbind(p, result_1 = rowSums((p-c(test))^2))
HTH,
Jorge.-
On Fri, Mar 16, 2012 at 8:32 AM, mrzung <> wrote:
> hi,
>
> i'm really in trouble to simulate some experiment.
> that is, it takes too much time to process the following code.
>
> following is short example,
>
>
>
i think if you do:
coord$time<-YOURTIMEVECTOR
should work and the new vector is put correctly in the data slot.
Maybe also
coord@data$time<-YOURTIMEVECTOR
On Wed, Mar 14, 2012 at 01:39:20PM +0100, Marco Smolla wrote:
> Hej hej,
> is there a way to extend the SpatialPointsDataFrame data slot?T
Hi Manish,
Try
# data set
x <- structure(list(V1 = structure(c(1L, 3L, 4L, 2L, 4L, 2L), .Label =
c("A",
"E", "X", "Z"), class = "factor"), V2 = structure(c(1L, 2L, 3L,
4L, 3L, 4L), .Label = c("B", "T", "U", "V"), class = "factor"),
V3 = structure(c(1L, 1L, 3L, 3L, 3L, 2L), .Label = c("C",
That works great by the way. Thanks very much for your help!
--
View this message in context:
http://r.789695.n4.nabble.com/Adding-mean-values-to-boxplots-tp4474700p4478031.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-proj
Hey Gerrit ,
Thanks your solution works
--
View this message in context:
http://r.789695.n4.nabble.com/replacing-values-in-Array-tp4468739p4477758.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
htt
Hi,
Package "ncdf4" is not available for Windows.
Regards,
Pascal
- Mail original -
De : Amen
À : r-help@r-project.org
Cc :
Envoyé le : Vendredi 16 mars 2012 16h39
Objet : [R] ncd4 package
Hi
I am using windows. I cant install ncdf4 package but it didn't work . any
suggestions!!
-
hi,
i'm really in trouble to simulate some experiment.
that is, it takes too much time to process the following code.
following is short example,
---
p<-data.frame(a=rnorm(10),b=rnorm(10),c=rnor
I am having trouble reading this CSV file in R. There are six attributes
that I need to read - CVar1, CVar2, Location, Year, Nvar3, Nvar4. Can
somebody help in reading this file?
On line 10 it has city and state separated by comma. I had been a user of
SAS where I can use different format to read
hey,
thanks for the hint. I too figured I'd have to write a for-loop. I have the
problem now of how to extract the single element of the fitted values
vector. For example, run 1 of the regression generates 80 fitted values, run
2 generates 81 fitted values, run 3 produces 82 fitted values and so
Hi everyone,
I have a question for R code to merge.
Say I have two dataframes:
File1 is:
V1V2V3V4
1100101name1
2200201name2
2300301name3
3400401name4
3500501name5
4600601name6
4700701name7
File2 is:
V1
I got theses but no interface
> library(udunits2)
> library(ncdf)
> local({pkg <- select.list(sort(.packages(all.available =
> TRUE)),graphics=TRUE)
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
>
--
View this message in context:
http://r.789695.n4.nabble.com/ncd4-package-tp4477496p44777
Thanks a lot
I installed it but the interface did not show up
I got this message
> Local ({pkg <- select.list (sort (. Packages (all.available = TRUE)),
> graphics = TRUE)
+ If (nchar (pkg)) library (pkg, character.only = TRUE)})
Notification message:
package 'RNetCDF has been compiled with version
Martin Morgan wrote
>
> On 03/15/2012 09:51 AM, Alexander wrote:
>> Hi Martin,
>> thanks for your quick answer. I didn't know that '.' could be
>> missleading.
>> Is there any standard way to name function for S4 objects? "get","set"
>> etc..?
>
> Hi Alexander -- it's usually better to include t
Hi,
I am newbie to R and working on result presentation? My Input table is in
following format
A B CD
X TCK
Z U ZM
E VZR
Z U
Dear R users,
I wish to run spatial point pattern analysis (e.g. pair correlation function,
mark correlation function) for which I need to create an observation window
(window=owin) from which the spatial analysis is generated. The command I used
to create this observation window as
ex.nc
[1] "file cruncep_tair_2010.nc has 4 dimensions:"
[1] "longitude Size: 720"
[1] "latitude Size: 360"
[1] "time Size: 1460"
[1] "points_terre Size: 62482"
[1] ""
[1] "file cruncep_tair_2010.nc has 4 variables:"
[1] "int mask[longitude,latitude] Longname:mask Mi
On Thu, Mar 15, 2012 at 10:48:48AM -0700, Filoche wrote:
> Hi everyone.
>
> Based on a dependent variable (y), I'm trying to generate some independent
> variables with a specified correlation. For this there's no problems.
> However, I would like that have all my "regressors" to be orthogonal (i.e
1 - 100 of 125 matches
Mail list logo