Displaying 20 results from an estimated 1000 matches similar to: "Changing factor to numeric"
2009 Nov 27
6
Learning R - View datasets
Hi All,
I am making a serious effort to try to learn R, but one hurdle I am facing is that I need to "see" the data as I walk through the examples in the packages. For instance, many examples on the web start by a command like data("wines"). How can I actually view what the dataset looks like prior to transformations and analysis? I have tried to use edit() , print, and
2008 Aug 06
3
Help in running Stata dataset in R
Dear All,
I installed R 2.7.0 and tried to call a dataset i had ealier own called
on R2.6.2 but i keep on getting an error:
use("maltreat.dta")
Error in fromchar(x) :
character string is not in a standard unambiguous format
Tried doing the same with R2.7.1 but i get the same error.
However if i call the same on R 2.6.2, there is no error:
use("maltreat.dta")
> des()
2008 Jul 22
3
Error in installing packages
Dear R Users;
I am an R user who has recently bought a new laptop;Toshiba Satellite
U405 running on both Windows Vista and Ubuntu.
I have problems on the wondows vista when installing packages. The
argument 'lib' is missing. How do i solve this problem?
Illustration:
> install.packages("epicalc")
Warning in install.packages("epicalc") :
argument 'lib'
2009 Mar 05
3
Dropping rows conditionally
Dear R-help team,
I am getting addicted to using R but keep on getting many challenges on the way especially on data management (data cleaning).
I have been wanting to drop all the rows if there values are `NA' or have specific values like 1 or 2 or 3.
mdat <- matrix(1:21, nrow = 7, ncol=3, byrow=TRUE,
dimnames = list(c("row1",
2009 Aug 20
2
getting R 2.9.1 from the tar.gz file
Dear Sir,
I am almost giving up on getting the R-2.9.1 on the ubuntu 9.04 using the instructions found on the R site.
I decided to use the R-2.9.1.tar.gz and untarred it.
I then typed ./configure and the results are shown below.
However, on typing make, I got an error, "No targets specified and no makefile found stop"
What is the solution?
lmramba at LMramba-dll-d:~$ su
Password:
2006 Aug 31
6
newbie question about index
Hi,
I am trying to convert a variable a = sample(1:3,100,rep = T) represents choices into a 3X100 dummy varible b with corresponding element set to 1 otherwise 0.
eg.
a: 1 3 2 1 2 3 1 1....
b: 1 0 0 1 0 0 1 1..
0 0 1 0 1 0 0 0...
0 1 0 0 0 1 0 0...
Is there something like b[a] =1 existing? I could not figure this out myself.
---------------------------------
2006 Jan 24
1
Hunting for DIDs in Kenya/Nigeria
Don't know if anyone's got experiences on this they'd be able to share...
I'm trying to obtain numbers for Kenya/Nigeria, but I'm struggling to find a
company selling them. There's one for Nigeria listed on didx.com, but
$22/month seems a little steep. Has anyone had any luck getting DIDs for
countries in Africa, and are there any companies out there selling them?
Thanks
2002 Jan 08
6
Subsets without NA
Is there a way of removing all rows with missing values from a data frame?
I usually use
subset(x, var1!="NA")
and repeat for each variable. It would be nice to be able to do it in one
fell swoop. Also, surprisingly, it doesn't always work. Sometimes I'm left
with an empty set even though not all rows have missing values for the
variable.
Cheers,
mikkel
Mikkel Grum,
2008 Jul 25
0
Errror in running R2.7.1 version to R2.6.2 version
Dear all,
I get an error shown below when i run the command "use" found in
package epicalc on R2.7.1 and R2.7.0 but dont get the error when i run
it on R 2.6.2
What is likely to be the problem?
library(epicalc)
Loading required package: foreign
Loading required package: survival
Loading required package: splines
use("malvac.dta")
Error in fromchar(x) :
character string
2004 Feb 05
2
correction to the previously asked question (about merging factors)
I have two factors l1, l2, and I'd like to merge them.
(Remark: The factors can not be converted to charaters)
Function c() does not give me the result I want:
> l1 = factor(c('aaaa', 'bbbb'))
> l2 = factor(c('ccc', 'dd'))
> lMerge = factor(c(l1, l2))
> lMerge
[1] 1 2 1 2
Levels: 1 2
>
I'd like to merge l1 and l2 and to get lMerge
2006 Jun 14
3
Decimal series how to make.........
Hi List,
I am new to this Rsoftware, i want to make a sereis for example which is having values like this, s<- 0,0.1,0.2,0.3,0.4........,1
i tryed this statement
s<-0:0.1:1
but this giving an error megssage.
but by default increment 1 it is taking ,,,,,so what to do ,,
i want to use this varible in for loop..
like for(j in s)
thanks in advance
ANIL KUMAR( METEOROLOGIST)
LRF
2005 Jun 03
2
Inactivity restart segmentation fault
Hi all,
for an unknown reason, I find my asterisk server down every morning as
a result of failing to restart during the night because of a
segmentation fault. The error message is as follows:
Waiting for inactivity to perform restart...
Executing last minute cleanups
== Destroying any remaining musiconhold processes
Asterisk cleanly ending (0).
-- Remote UNIX connection
Waiting for
2004 Feb 27
2
Samba and non-ascii characters
Hello everyone,
I have a problem with smbmount. After I mount a certain share, I can not
view files with weird charaters in their name. This happends for example
with the copyright char.
After searching with Google I still didn't find an answer. I guess it has
something to do with a 'charset' command, but I can't figure out wich one,
and what character table I should use...
2003 Dec 23
6
UTMP logging in Samba 3.0.1 does not have hostnames
Hi,
I was testing Samba 3.0.1 as a logon server on a Solaris 9 Sparc box.
I compiled Samba using gcc 3.3 with the following options:
configure --prefix=/local/samba-3.0.1 --enable-static --with-nis
--with-quotas --with-syslog --with-msdfs --with-utmp
I set utmp = yes in the smb.conf file
The samba server does create login entries but minus the hostname
entries. The following
2008 Jul 10
3
charaters problem
Hi folks :-)
Mounting a shared ntfs volume in debian os, I see some files like this:
L'?uomo di notte.jpg
the real name is: L'?omo di notte.jpg
So, when I try to open this file (from a client) a message error appear: "the
file doesn't exist".
How can I resolve this problem?
Thanks
Pol
2012 May 25
4
Hash Table - Select and Change Data iniside Matrix
Hi,
Here i have been a matrix like this,
*NAME AGE PALCE TRUE/FALSE*
ABC 20 INDIA
XYZ 30 FRANCE
PQR 40 USA
MNO 30 KENIYA
DEF 25 AUSTRALIA
Here,* TRUE/FALSE* Column containing empty values.
So my requirement what is , need to change all the *TRUE/FALSE *column value
into "*TRUE*" where *AGE =
2005 Oct 10
2
wildcards and removing variables
All,
Is there are a wildcard in R for varible names as in unix? For example,
rm(results*)
to remove all variable or function names that begin w/ "results"?
cheers,
Dave
ps - please respond directly to afshar@miami.edu
[[alternative HTML version deleted]]
2009 Nov 02
5
Working round 'invalid byte sequence'
I am a very amateur Rubyist who, amongst other things, likes to use a
simple Rails app to query my company''s MySQL config database. The
server I now use to do this has got 1.9.1 and Rails 2.3.3. I''ve now hit
the ''problems'' related to 1.9 and string encoding, which means that when
Rails try to display, say, E acute characters, it throws an invalid byte
2001 Aug 21
4
looking for a smarter way
I have two problems where I've come up with some code that will do the
analysis that I want, but it looks pretty clumsy. In the first case, I
calculate the variance on five different columns for each of 14 clusters and
get them into one matrix. I get the job done, but I would have thought that
it could be done in one or two lines, not six, and be generalized so that it
didn't matter how
2007 Feb 14
2
environement.rb compent récupérer une variable ?
Salut,
Je souhaiterai définir dans mon fichier environement.rb une variable qui
puisse être récupéré dans mes controlleurs.
Plus précisément je souahiterai initialiser une varible avec l''ip du
serveur qui héberge l''appli et pouvoir la récupérer dans mes
controlleurs.
Je suis sur que c''est trés simple mais je n''ai pas trouvé l''info.
Merci !
--