Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6767219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:55:30+00:00 2026-05-26T14:55:30+00:00

I have a file in this format: ASCII format The first rows look like

  • 0

I have a file in this format:

ASCII format

The first rows look like this:

ncols 1440
nrows 720
xllcorner -180.0
yllcorner -90
cellsize 0.25
NODATA_value -9999

Basically I have the world with 1440 ’tiles’ in x direction (longitude) and 720 ’tiles’ in y direction (latitude). Each ’tile’ is a square with a length of 0.25 degrees. I think I have xllcorner and yllcorner correct. I can draw this map like this in R:

library("adehabitat")
bio1 <- import.asc("D:/ENFA/data.asc")
maps <- as.kasc(list(data = bio1))
image(maps, col = cm.colors(256), clfac = list(Aspect = cl))

The map looks fine.

I would like to perform some ecological niche factor analysis (ENFA) using the adehabitat package and am not too sure about the location data. Basically I have them as longitudes and latitudes at the moment but I could also generate then as ’tile index’ (e.g. lower left corner has the latitude -90 and longitude -180 so the ’tile index’ would be 0, 0 – right?). Which is the correct location data format? I would use ENFA code like this:

locs <- read.table("D:/ENFA/Locs.txt", header = TRUE, sep="\t")
dataenfa1 <- data2enfa(maps, locs)
pc <- dudi.pca(dataenfa1$tab, scannf = FALSE)
enfa1 <- enfa(pc, dataenfa1$pr,scannf = FALSE)
hist(enfa1)

I would appreciate any comments please. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:55:30+00:00Added an answer on May 26, 2026 at 2:55 pm

    The problem with leaving your coordinates in lat-long form is that, at most places on earth, a degree of longitude has a different length than a degree of latitude. This might distort your ENFA by exaggerating distances in some directions relative to those in others.

    Especially if your data are from a relatively small area, I’d suggest re-expressing the coordinates in meters along an W/E x-axis and S/N y-axis. If all of your points fall inside a single UTM zone, then you could do the conversion within R, using project() in the rgdal package:

    Here’s one example, taken from here:

    library(rgdal)
    
    # Make a two-column matrix, col1 = long, col2 = lat
    xy <- cbind(c(118, 119), c(10, 50))
    # Convert it to UTM coordinates (in units of meters)
    project(xy, "+proj=utm +zone=51 ellps=WGS84")
              [,1]    [,2]
    [1,] -48636.65 1109577
    [2,] 213372.05 5546301 
    

    Much more info about how to manipulate spatial data is available in the “Applied Spatial Data Analysis with R” by Bivand, Pebesma, and Gomez-Rubio. If you need more specific assistance, try the R-sig-Geo mailing list.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text file of this format: L O A D C A
I am reading a text file with this format: grrr,some text,45.4321,54.22134 I just have
I have a file in .gz format. The java class for reading this file
I have this exported file of some weird (standard for this industry!) format, which
I have a filename that has the following format: timestamp-username-1 This file is constantly
I have a file like this. rm a.txt mkdir foo cp a.doc docs I
i have a file like this: term1 term2 term3 term4 term2 term1 term5 term3
Currently I just have a file like this that I manually parse into a
I have a file in CSV format where the delimiter is the ASCII unit
I have a properties file in this format attribute1=ó The problem is I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.