Hi Jean, thank-you again.
Both the assignment of names and the indices of the successful locations
worked perfectly.
Irucka Embry
<-Original Message->
>From: Adams, Jean [jvad...@usgs.gov]
>Sent: 12/28/2012 1:28:29 PM
>To: iruc...@mail2world.com
>Cc: r-help@r-project.org
>Subject: Re:
https://stat.ethz.ch/pipermail/r-help/2012-December/332658.html
>> Is there packaged code to convert geographical coordinates (e.g.,
>> longitude, latitude, elevation) to Cartesian coordinates in 3-space?
...
>> Net: the task seems straightforward enough, but there's certainly
>> scope for error,
Have you checked the spatial stats task view on CRAN?
http://cran.r-project.org/web/views/Spatial.html
-- Bert
On Sun, Dec 30, 2012 at 6:49 PM, Tom Roche wrote:
>
> Is there packaged code to convert geographical coordinates (e.g.,
> longitude, latitude, elevation) to Cartesian coordinates in 3
Many thanks arun!
Your answer is the best one :)
At 2012-12-31 10:51:35,arun wrote:
>HI Meng,
>
>NO problem.
>#In fact,
>sweep(dat,2,z,"*") #will be data.frame
> # x1 x2 x3
>#1 2 120 2500
>#2 5 200 5000
>#3 8 300 6200
> str(sweep(dat,2,z,"*"))
>#'data.frame':3 obs. of 3 varia
HI Meng,
NO problem.
#In fact,
sweep(dat,2,z,"*") #will be data.frame
# x1 x2 x3
#1 2 120 2500
#2 5 200 5000
#3 8 300 6200
str(sweep(dat,2,z,"*"))
#'data.frame': 3 obs. of 3 variables:
# $ x1: num 2 5 8
# $ x2: num 120 200 300
# $ x3: num 2500 5000 6200
A.K.
_
Hi,arun:
Yes,your answer is what I want.
A little different is :
data.frame(t(t(dat)*z))
Because I wanna get the "data frame"type, not matrix.
Thanks for your reply.
At 2012-12-31 00:59:43,arun wrote:
>HI,
>Its not clear esp
>"
>I wanna do the following:
>10*x1,100*x2,1000*x3"
>
>Did
Hi Berend:
Thanks for your reply.
dat<-data.frame(x1=1:3,x2=4:6,x3=7:9)
z<-c(0.1,10,100)
#I wanna 0.1*x1,10*x2,100*x3
Option2 is similar as "dat*rep(z,each=length(z))",and the latter is simpler
than Option2 in expression.
At 2012-12-31 00:31:42,"Berend Hasselman" wrote:
>
>On 30-12-20
The following is also work:
data.frame(t(t(dat)*z))
At 2012-12-31 00:40:24,"Neal H. Walfield" wrote:
>At Sun, 30 Dec 2012 16:28:44 +,
>Andrius Druzinis wrote:
>>
>> Hi Neal,
>>
>> Notice that c(2, 3) gets replicated into c(2, 3, 2, 3, 2, 3) and then
>> multiplied by column. This is
Hi Neal,
Thanks for your reply.
dat<-data.frame(x1=1:3,x2=4:6,x3=7:9)
z<-c(0.1,10,100)
#I wanna 0.1*x1,10*x2,100*x3
According to your answer:
> as.matrix(dat)*z
x1x2x3
[1,] 0.1 0.4 0.7
[2,] 20.0 50.0 80.0
[3,] 300.0 600.0 900.0
The above is not what I want.
What I want i
Hi Andrius:
Thanks for your reply.
Your answer: dat*rep(z,each=nrow(dat)) works well.
But a strange thing happened:
dat<-data.frame(x1=1:3,x2=4:6,x3=7:9)
z<-c(0.1,10,100)
#I wanna 0.1*x1,10*x2,100*x3
I type:
dat*rep(z,rach=nrow(dat))
"rach" is "each" indeed,but I type "rach" mistakenly.
What's s
Is there packaged code to convert geographical coordinates (e.g.,
longitude, latitude, elevation) to Cartesian coordinates in 3-space?
I can see how to do this using
1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr)
http://cran.r-project.org/web/packages/pracma/
2. a geographic
HI Usha,
I tried the codes on the full dataset. This is what I get:
BP_2b<-read.csv("BP_2b.csv",sep="\t")
#head(BP_2b,2)
# CODEA Sex MaternalAge Education Birthplace AggScore IntScore Obese14
#1 1 NA 3 4 1 NA NA NA
#2 3 2 3
HI,
Its not clear esp
"
I wanna do the following:
10*x1,100*x2,1000*x3"
Did you mean 10* dat[,1], 100*dat[,2], 1000*dat[,3]?
dat<-read.table(text="
x1 x2 x3
0.2 1.2 2.5
0.5 2 5
0.8 3 6.2
",sep="",header=TRUE)
z<-c(10,100,1000) # 3rd element in your z is 100, which is confusing
Hi Neal,
Notice that c(2, 3) gets replicated into c(2, 3, 2, 3, 2, 3) and then
multiplied by column. This is not the same as multiplying each column by
the respective element in vector c(2, 3).
Andrius
2012/12/30 Neal H. Walfield
> At Sun, 30 Dec 2012 18:26:45 +0800 (CST),
> meng wrote:
> >
>
Hi Meng,
A one-liner would be
dat*rep(z, each=nrow(dat))
Cheers,
Andrius
2012/12/30 meng
> hi all:
> Here's a dataframe(dat) and a vector(z):
>
> dat:
> x1 x2x3
> 0.2 1.2 2.5
> 0.5 2 5
> 0.8 3 6.2
>
> > z
> [1] 10 100 100
>
> I wanna do the following:
> 10*x1,100*x2
A (late) update to this question:
On Fri Aug 17 07:33:29, Henrik Singmann wrote:
> Hi Diego,
>
> I am struggeling with this question also for some time and there does
> not seem to be an easy and general solution to this problem. At least
I
> haven't found one.
> However, if you have just one re
On 29 December 2012 20:35, arun wrote:
>> Is it possible to obtain the same result as X without converting X to R?
What do you mean by the same result? There is a relationship between X and R.
If you express this relationship algebraically, you can get X directly using
Y and Z tensors, vice versa
Took some googling, but it was worth it! :)
Best,
Simone
Sent from my iPhone. Please excuse brevity and odd typos
Il giorno 30/dic/2012, alle ore 19:44, Bert Gunter ha
scritto:
> Are you "learning the ropes" or "on the ropes"?
__
R-help@r-project.o
On 2012-12-30 06:25, Janue Miret, Jofre wrote:
I have two questions;
Do you know how to take out axes in a levelplot? Me doesn't work axes =
FALSE
levelplot() is a lattice function, not base graphics; it has no 'axes'
argument. Read about the 'scales' argument in ?xyplot and use
levelplot(..
It is very dependent on your background and what you are planning to do.
Because R is a tool that seems to be used by everyone from linguists to
biochemists and everyone has their special interest it is often best to just
google for what you are looking for.
Here aresome sources that I fin
https://www.coursera.org/course/stats1
or
https://www.coursera.org/course/compdata
On Sun, Dec 30, 2012 at 1:22 PM, Siddhant Gupta wrote:
> I have installed R on my machine.
>
> Can anyone now suggest to me the best book/e-book from where I can learn
> the R language most efficiently?
>
> Thanks
At Sun, 30 Dec 2012 16:28:44 +,
Andrius Druzinis wrote:
>
> Hi Neal,
>
> Notice that c(2, 3) gets replicated into c(2, 3, 2, 3, 2, 3) and then
> multiplied by column. This is not the same as multiplying each column by
> the respective element in vector c(2, 3).
I think you mean multiplied by
On 30-12-2012, at 11:26, meng wrote:
> hi all:
> Here's a dataframe(dat) and a vector(z):
>
> dat:
> x1 x2x3
> 0.2 1.2 2.5
> 0.5 2 5
> 0.8 3 6.2
>
>> z
> [1] 10 100 100
>
> I wanna do the following:
> 10*x1,100*x2,1000*x3
>
> My solution is using the loop for z and
Please read the Posting Guide mentioned at the bottom of any message on this
list (and follow the recommendations there).
You may find the suggestions offered here useful:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Efficiency of learning materials depends on your background and learning style.
If you have any background at all in using software, the Introduction to R
document that is supplied with R is quite good. There is also a very useful
document on getting data in and out of R. There is a list of R bo
At Sun, 30 Dec 2012 18:26:45 +0800 (CST),
meng wrote:
>
> hi all:
> Here's a dataframe(dat) and a vector(z):
>
> dat:
> x1 x2x3
> 0.2 1.2 2.5
> 0.5 2 5
> 0.8 3 6.2
>
> > z
> [1] 10 100 100
>
> I wanna do the following:
> 10*x1,100*x2,1000*x3
>
> My solution is us
On 30 Dec 2012, at 12:22 , Siddhant Gupta wrote:
> I have installed R on my machine.
>
> Can anyone now suggest to me the best book/e-book from where I can learn
> the R language most efficiently?
>
> Thanks in advance
>
> --
> Siddhant Gupta
> III Year
> Department of Biotechnology
> IIT Roo
hi all:
Here's a dataframe(dat) and a vector(z):
dat:
x1 x2x3
0.2 1.2 2.5
0.5 2 5
0.8 3 6.2
> z
[1] 10 100 100
I wanna do the following:
10*x1,100*x2,1000*x3
My solution is using the loop for z and dat(since the length of z is the same
as ncol of dat),which is t
I have installed R on my machine.
Can anyone now suggest to me the best book/e-book from where I can learn
the R language most efficiently?
Thanks in advance
--
Siddhant Gupta
III Year
Department of Biotechnology
IIT Roorkee
India
[[alternative HTML version deleted]]
_
I have two questions;
Do you know how to take out axes in a levelplot? Me doesn't work axes =
FALSE
And I would like to fix the values range of colorkey or legend from my
rainbow col.regions, dou you know how can I fix this values independent
of values database?
Thanks and happy new year!
thankyou prof. ripley
elisa
> Date: Sun, 30 Dec 2012 14:47:29 +
> From: rip...@stats.ox.ac.uk
> To: r-help@r-project.org
> Subject: Re: [R] Sheet index (-2147483648) is out of range (0..15)
>
> On 30/12/2012 14:34, eliza botto wrote:
> >
> > Dear useRs,
> > while working in XLConnect, i noti
On 30/12/2012 14:34, eliza botto wrote:
Dear useRs,
while working in XLConnect, i noticed a strange error
"Error: IllegalArgumentException (Java): Sheet index (-2147483648) is out of range
(0..15)"
there is not much help available about it online. Can anyone please help?
That's the value of N
Dear useRs,
while working in XLConnect, i noticed a strange error
"Error: IllegalArgumentException (Java): Sheet index (-2147483648) is out of
range (0..15)"
there is not much help available about it online. Can anyone please help?
elisa
[[alternative
On Sat, 2012-12-29 at 20:40 +, Laura Martínez Suz wrote:
> Hello there,
> I'm trying to plot vectors with p<0.1 in a NMDS ordination plot using p.max.
> Below the scripts I'm using. I guess I'm missing something! could you please
> give me a hand?
> species<-metaMDS(species_matrix)ef<-envfit(
On Thu, 27 Dec 2012 22:01:22 -0500
Steve Powers wrote:
Two points:
1) You don't define "crash." Did the script simply hang, did R
abruptly cease to run and exit to the OS, did the display freeze, did
the OS and machine stop working? "Crashing" is not explanatory, nor is
it descriptive of your
On 30/12/2012 07:47, Rashid Ameer wrote:
I have used acf() and pacf() in R to get the acf and pacf values at
max/lag=20
but the output did not show the values associated with lag numbers. lag
numbers is shown in decimals.
What 'lag numbers'?
Lags in time series are in time units: most likely y
I have used acf() and pacf() in R to get the acf and pacf values at
max/lag=20
but the output did not show the values associated with lag numbers. lag
numbers is shown in decimals.
--
Rashid Ameer
View my recent publication at
*
http://www.emeraldinsight.com/fwd.htm?id=aob&ini=aob&doi=10.1108/1753
37 matches
Mail list logo