Displaying 20 results from an estimated 4000 matches similar to: "Q: selecting a name when it is known as a string"
2012 Jan 10
1
error in Recursive
Hi
I need help in the recursive problem. this is my code
#Generate two random Numbers
minval=20
maxval=100
cutoffValue=50
optVal<- function(cutoffValue,minval,maxval)
{
x=runif(2)
x=x*cutoffValue
for( i in 1:2)
{
if(x[i] < 30 || x[i] >60) # checking it falls between the range
{
optVal(cutoffValue,minval,maxval)
}
}
return(x)
}
2007 Mar 23
1
objects of class "matrix" and mode "list"?
Hello everyone,
I cannot seem to find information about objects of class "matrix" and mode
"list", and how to handle them (apart from flattening the list). I get this
type of object from using sapply(). Sorry for the long example, but the code
below illustrates how I get this type of object. Is anyone aware of
documentation regarding this object?
Thanks very much,
Stephen
2008 Mar 06
2
R code for selecting places spatially and by time
Hi all
The code of trying to write relates to selecting properties (given by x
and y co-ordinates) spatially (distance "X" from "infected" properties
identified by date) over a certain time period.
i.e. what properties are within 3 km from properties infected on
"2008-01-01" over the last 14 days.
Is any one able to give me some clues on how to write code to solve
2005 May 16
2
Fitting Contour to Data Points
Apologies for the mass mailing today!
I am attempting to produce a contour plot for phsical data on a map
matrix. I have a small number of data points which each has an (x,y)
co-ordinate together with a corresponding value which I would like to
cvreate a contour plot for.
I have tried the following code:
contour(data$x,data$y,data$value)
but am told:
Error in contour.default(data$x, data$y,
2005 Jul 05
0
lowess output looks wrong (PR#7891)
Just noticed nobody has commented on this, so I took a look, and I can't
see the problem (2.1.0 looks the same as 2.1.1 to me). What is supposed
to be wrong?
Duncan Murdoch
On 5/23/2005 2:35 PM, pelzc at ohsu.edu wrote:
> Full_Name: Carl Pelz
> Version: 2.1.0 & 2.0.1
> OS: Windows 2000
> Submission from: (NULL) (137.53.64.158)
>
>
> # Paste this all into an R
2007 Aug 31
3
data frame row manipulation
Hello,
struggling with the very basic needs... :( any help appreciated.
#using the package doBY
#who drinks how much beer per day and therefor cannot calculate rowise
maxvals
evaluation=data.frame(date=c(1,2,3,4,5,6,7,8,9),
name=c("Michael","Steve","Bob",
"Michael","Steve","Bob","Michael","Steve","Bob"),
2010 Mar 06
2
memory error in for loop
hi,
I have been attempting to run this script and am getting some strange
results. The script connects to a database and retrieves a series of
tables, using sequential sql statements. I have tested all of the sql
statements in the PostGreSQL terminal and they all return the desired
results. I place each table into a list and run a FOR loop for 'i' in
the list. The script generates
2011 May 02
2
Help with coloring segments on a plot
Hi. I need a very short piece of help regarding colouring segments plotted
on a graph.
When I am plotting segments for the graph, I am using "red" and "darkgreen
for the values "1" and "2" respectively. Heres the relevant line of code in
R:
+ col = c("red", "darkgreen")[line.colour.value])
I just need to extend this to refer to a larger
2008 Oct 06
3
horizontal boxplot + xlim
Hi there,
I get a strange behaviour of a boxplot with the following code. There seems to
be a problem with the xlim-parameter. Did I do anything wrong? What else can I
do to force the boxplot to have a defined x-range?
x <- rnorm(100)
boxplot(x, notch=TRUE, xlab=parameter, xlim <- c(-4,4), horizontal = TRUE)
Antje
2002 Dec 08
3
strange QQ-Plot
Hi,
i am working on a data set with EDA. That includes QQ-Plots of
residuals vs expected normal distribution.
What puzzles me is that the range of ordinate and abscissae is
so different: while the theoretical quantiles range from [-2, 2]
the sample quantiles on the ordinate do extent from [-20, 50].
Quite obviously some kind of transformation is done.
Although i intensively RTFM i could not
2017 Dec 26
2
plot representation of calculated value known to be 7.4
Thanks a lot - formatting the ordinate as ylim=c(4,10) before plotting
pH also removed the problem, and options(digits=10) confirmed that pH
was not all exactly 7.4 - as I knew. Still I wonder just why R chooses
to plot(ATOT,pH) as shown with repeated "7.4" instead of some more
detailed representation. Thanks a gain and happy New Year!
Troels
Den 26-12-2017 kl. 01:03 skrev Bert
2009 Apr 23
1
Loess over split data
Dear R users,
I am having trouble devising an efficient way to run a loess() function
on all columns of a data.frame (with the x factor remaining the same for
all columns) and I was hoping that someone here could help me fix my
code so that I won't have to resort to using a for loop.
(You'll find the upcoming lines of code in a single block near the end
of the message.)
Here's a
2009 Nov 17
2
Lattice plot
Hi,
I was trying to get a graph in lattice with the following data frame (7 rows, 5 cols):
chr start1 end1 meth positive
1 1 10 20 1.5 y
2 2 12 18 -0.7 n
3 3 22 34 2.0 y
4 1 35 70 3.0 y
5 1 120 140 -1.3 n
6 1 180 190 0.2 y
7 2 220 300 0.4 y
I wanted the panels to be organized by 'chr' -
2012 Nov 30
3
(no subject)
Hello R usuer,
The code given below superimposes a pie diagram on another plot
containing some points. However, I would like to center the pie
diagram on the xy location on the plot, but not on the center. is
there any way to re-center pic diagram.
Any suggestion or better alternative are highly appreciated.
Thank you in advance for your help.
Regards,
Bibke
library(visualFields)
library(car)
2008 Jun 13
1
Level Plot and Scale of Colorkey
I am drawing level plots but I would like to specify the range of the colorkey, I am not having any success figuring this out so any help would be greatly appreciated!
Here is an example of what I am trying to do:
disp<-1
x <- seq(1, 10,by=1)
y <- seq(1,10,by=1)
g <- expand.grid(x = x, y = y)
g$z <- 1/exp((abs(g$x-5)+abs(g$y-5))*disp)
g$z<-g$z/sum(g$z)
levelplot(z ~ x * y,
2009 Sep 03
2
[LLVMdev] 2.6 pre-release1 ready for testing
Hi Tanya,
I have tried the 2.6 pre-release on the following host :
Windows XP pro SP2 with mingw/msys :
uname -a
MINGW32_NT-5.1 OLIVE 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown
gcc -v
Reading specs from d:/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw
--enable-threads
2002 May 08
3
Inputting Co-ordinates
Hello
I am trying to input some co-ordinate sets into R of the form x,y by using
lists. The command I am using is:
p1 <- list(x=c(3445,563,646), y=c(234,567,456))
However the actual co-ordinate sets that I am trying to input have 305
points each and I think that the program will not accept a command that is
as long as necessary. Is this so? If this is the case can you tell me how
to read
2001 Jun 23
3
gcc 2.95.2/irix/Laguerre_With_Deflation/inifinte loop
I built ogg vorbis from the rc1 cvs source on Irix 6.5.12
with gcc 2.95.2. Using oggenc I encoded about 8,000 aiff files
but found about a dozen where oggenc would go into an infinite
loop. I tracked the problem with Laguerre_With_Deflation() as far back
as
logmask being Inf in floor0_forward. I'm now building gcc 3.0 with the
expectation this is a compiler issue. If not, I'll back
2007 Mar 05
4
Identifying points in a plot that have duplicate values
I have code like this: -
#-----------------------------------------------------------------------
------------------------------------------------------
x=scan()
0 0 0 0 0 1 2 3 4
y=scan()
1 1 1 2 2 1 3 4 5
plot(x,y)
identify(0,1,3) #Allows me to select manually to identify co-ordinate
(0,1) as being duplicated 3 times
identify(0,2,2) #Allows me to select manually to identify co-ordinate
2011 Nov 23
2
How to increase precision to handle very low P-values
Hello, Rlisters
I have to compute p-values that are on the tail of the distribution,
P-values < 10^-20.
However, my current implementations enable one to estimate P-values up to
10^-12, or so.
A typical example is found below, where t is my critical value.
########### example - code adapted from Rassoc #######################
rho01 = 0.5
rho105 = 0.5
rho005 = 0.5
t = 8
z = 2