printing time in 24 hours format in unix [closed] - unix

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
write command to print time in 24 hour format in unix.

Just use the date command:
Details:
man date

Just Try:
date -d %R

Related

Solving linear equation in one variable in R [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
How do we find the solution of x
say in
2*x=6
using R?
It must be very trivial but I cant find out the appropriate answer.
You can use the solve() function, which can actually handle multiple equations:
solve(2, 6)
The first argument is the left side of the equation, the second is the right side.

Limitation on number of items in c() function in R [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
There seems to be a limit to number of items that can be included in c() function in R (100 items).
Is there any way to evade this limitation?
Thanks in advance.
There is a limit, but it is a limit of vector length, not a limitation of c:
length(eval(call('c', 1:(2^31-1))))
## [1] 2147483647
length(eval(call('c', 1:(2^31))))
## Error in 1:(2^31) : result would be too long a vector

How do I import a CSV file in R? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a .csv file in my workstation. How can I open that file in R and do statistical calculation?
You would use the read.csv function; for example:
dat = read.csv("spam.csv", header = TRUE)
You can also reference this tutorial for more details.
Note: make sure the .csv file to read is in your working directory (using getwd()) or specify the right path to file. If you want, you can set the current directory using setwd.

Abbreviating variables in R [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am using a data set called Forbes2000 which is provided by the package HSAUR. I am able to plot the data but not able to abbreviate each point with the corresponding country name. Here is the code I have tried:
Forbes2000top50ccompanies <- head(Forbes2000[order(Forbes2000$profits, decreasing= T),], n = 50)
plot(sales ~ assets,data=Forbes2000top50ccompanies)
This will give you labels that are the first 4 letters of the country names and make them smaller than would be the default:
with(Forbes2000top50ccompanies,
text(x=assets, y=sales,
labels=substr(Forbes2000top50ccompanies$country, 1, 4), cex=0.6) )

How do I strip the null byte from a string in R? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How do I strip the null byte from a string in R?
Something like this:
> gsub('\0', '', 'doot\0')
Error: embedded nul in string: '\0'

Resources